Solved

What is the difference between messages and logs?

Posted on 2008-06-13
4
222 Views
Last Modified: 2013-12-26
I seen in Unix when an error occur ...

we will  look into logs  or messages .

What are the difference between these two ?
0
Comment
Question by:jaisonshereen
  • 2
4 Comments
 
LVL 77

Assisted Solution

by:arnold
arnold earned 300 total points
ID: 21780289
It is a matter of configuration and the applicaiton.

The messages is usually handled through syslog.  I.e. an application encounters an error it sends a notice to the syslog.  Based on the configuration of the syslogd.conf file the error is recorded in messages and/or someplace else.
A log file of an application could be directly accessed by the application. i.e. the application has an error, it appends the error into the log file.

Hope this clears things up.
0
 
LVL 62

Accepted Solution

by:
gheist earned 200 total points
ID: 21780322
"/var/log/messages" is very basic log file, commonly accessible by all system users. Maybe that is a reference to "syslog" program that does base logging of system events (like apache unable to write its logfile)
Some applications do write their own logs in their formats.
0
 

Author Comment

by:jaisonshereen
ID: 21780324
So both are used for application ..what is the difference here ..can give a real example?
0
 
LVL 77

Assisted Solution

by:arnold
arnold earned 300 total points
ID: 21780406
The difference is how the data gets into the file.
i.e. syslog (system event logger)
Apache maintains their own log files. access,error, etc.  The apache process directly inserts entries into those.

 
When a kernel process can not access a device/disk it sends an error message to syslog.  Syslog based on its configuration logs the error in /var/log/messages or another file defined within the /etc/syslogd.conf.
The difference is that the kernel process does not directly access a log file to write the error.  If syslog is not running, the error is not recorded.

In simpler terms, the difference is whether you write the error in the error log or you tell someone that there was an error and that person records the error in an error log.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

The term "Bad USB" is a buzz word that is usually used when talking about attacks on computer systems that involve USB devices. In this article, I will show what possibilities modern windows systems (win8.x and win10) offer to fight these attacks wi…
No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

861 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