?
Solved

Where do syslog messages come from?

Posted on 2007-03-30
2
Medium Priority
?
205 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 500 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month11 days, 1 hour left to enroll

770 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