How does Unix write events into event log?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How does Unix write events into event log?
# 1  
Old 07-13-2009
How does Unix write events into event log?

Hi to everyone. I'm new to this forum and also pretty new to Unix. I'm developing a cross-platform software and I need to register informational and error messages into the event log of the system. Under Windows, this is implemented so far, I need to implement it unded Unix by now.
I do know that the log file is just a text plain file, but I don't know where is it store and wich is its structure.
I would appreciate any suggestions and advice you have to me.
Best regards.
# 2  
Old 07-13-2009
You use the system logging daemon to write events to log files, see man 3 syslog for details.
# 3  
Old 07-13-2009
Thanks for your reply. I'm using Ubuntu 9, when I execute man command it says "No manual entry for syslog".
# 4  
Old 07-13-2009
Quote:
Originally Posted by mariano_donati
Thanks for your reply. I'm using Ubuntu 9, when I execute man command it says "No manual entry for syslog".
On Ubuntu, try:

man syslogd or man syslog.conf
# 5  
Old 07-13-2009
So, I must to write into syslog file according the rules specified in syslog.conf, isn't that right?. If it is so, where is it located?.
# 6  
Old 07-13-2009
No.

syslogd must be running, started by root.

The syslog command then writes to the syslog file.
Code:
syslog [facility] [message text]

Read the manpage for syslogd all the way from top to bottom, please.,
# 7  
Old 07-13-2009
I read it, but I think I misunderstood something. Let me get this right:

- There's a file to log the system events
- The only way I have access to that file is by calling syslog or may be through signal

And I wonder now if I could make my own log file so the event visor in Ubuntu can display it. Is there a way of doing it?
I'm sorry if I'm still misunderstanding something here. There're a punch of times that I don't get the hole idea of a phrase in english and translators doesn't help on that either.

Best regards.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Event Prediction - New Sports Events

Hi, Some sports predictions suggestions. Although the Celtics are still playing the Heat. Just being optimistic that they will win. Otherwise, please change to Heat. (9 Replies)
Discussion started by: ni2
9 Replies

2. UNIX for Dummies Questions & Answers

How to write code for a Logging Event?

How do I know what parts of the application to monitor and what means do I use to get this data? Can I use proc? What interactions are important and how do I view them?I would be more descriptive but I have not a clue. Thanks in... (18 Replies)
Discussion started by: theKbStockpiler
18 Replies
Login or Register to Ask a Question