Solved

What is the difference between messages and logs?

Posted on 2008-06-13
4
221 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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

773 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