Solved

Where do syslog messages come from?

Posted on 2007-03-30
2
203 Views
Last Modified: 2013-12-16
Experts:

I am trying to learn about syslog (and syslog-ng).  I have a question:  Where do the log messages come from?  Does the kernel just spew messages all the time?  If logging is not configured, do the messages just go nowhere?  Does the programmer of a particular program decide the severity level (warn, info, etc) or does the system somehow classify the messages?  

For instance, as a programmer, can I just arbitrarily decide to send a log message classified as, say, daemon.warn?  Or am I limited to what types of messages I can send.  How would a program actually send a log message?  Would it use the "logger" command?

Thanks,
Tnic
Memphis TN
0
Comment
Question by:tayloenic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 18826030
0
 
LVL 48

Accepted Solution

by:
Tintin earned 125 total points
ID: 18834042
Lots of questions there.

1.  Log messages come from any program that does it's logging via syslog function call or via the command line 'logger' command.

2.  The Kernel will send out a variety of syslog messages. It depends on your syslog.conf configuration as to how much is actually recorded in log files.

3.  If syslogd is not running, or the syslog message doesn't match any of the syslog.conf entries, then it effectively gets binned.

4.  It's up to the programmer to decide what messages are debug, critical, notice, info etc.

5.  A programmer can use whatever facility and notice level they like for logging.  However, it is not a good idea to mix your logging with the standard existing syslog facilities.  LOCAL0 to LOCAL6 are reserved for custom apps, so you can log via them to keep the app logs separate from everything else.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question