Solved

What is the difference between messages and logs?

Posted on 2008-06-13
4
223 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
[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
4 Comments
 
LVL 78

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 78

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

697 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