LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
  Search this Thread
Old 06-30-2009, 04: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, 04:28 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 03: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, 03:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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



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 11:56 AM
getting syslog to write to other file than /var/log/messages c_mitulescu Linux - Enterprise 6 04-02-2008 11:17 AM
Syslogd logging severity levels endfx Linux - Server 3 04-25-2007 11:28 AM
Redirecting the kernel messages to file other than /var/log/messages jyotika_b83 Linux - General 3 04-28-2005 07:39 PM
syslog and firestarter - log messages to another file than messages mule Linux - Newbie 0 08-07-2003 04:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:25 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration