LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 06-30-2009, 03:25 PM   #1
Himilhil
Member
 
Registered: Jun 2009
Posts: 52

Rep: Reputation: 15
Why don't syslogd write severity of messages to log file?


syslog() on my system (RHEL) accepts 'priority' argument that can be LOG_EMERG, LOG_ALERT etc. But this parameter isn't written to log file. Is it possible to configure syslogd to write severity to log file?
 
Old 06-30-2009, 03:28 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
not syslogd i don't believe, but something more modern like syslog-ng you certainly can.

Code:
destination logip {
	file("/archive/logs/HOSTS/$HOST_FROM/$FACILITY/$YEAR$MONTH/${FACILITY}${YEAR}${MONTH}${DAY}" 
	owner(syslog-ng) group(syslog-ng) perm(0600) dir_perm(0700) create_dirs(yes)
	template("$DATE $FULLHOST $PROGRAM $TAG [$FACILITY.$LEVEL] $MESSAGE\n")  ); 
};
 
Old 07-02-2009, 02:22 AM   #3
Himilhil
Member
 
Registered: Jun 2009
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
not syslogd i don't believe, but something more modern like syslog-ng you certainly can.
Is it possible to write to log with syslog-ng from PHP?
 
Old 07-02-2009, 02:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
PHP would write to a generic syslog subsystem, not a specific product.
 
  


Reply

Tags
syslog


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu and Bind - Named log file is not logging info after syslogd restarts Spacetrucker Linux - Server 7 05-13-2009 10:56 AM
getting syslog to write to other file than /var/log/messages c_mitulescu Linux - Enterprise 6 04-02-2008 10:17 AM
Syslogd logging severity levels endfx Linux - Server 3 04-25-2007 10:28 AM
Redirecting the kernel messages to file other than /var/log/messages jyotika_b83 Linux - General 3 04-28-2005 06:39 PM
syslog and firestarter - log messages to another file than messages mule Linux - Newbie 0 08-07-2003 03:35 AM


All times are GMT -5. The time now is 12:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration