LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-11-2011, 11:51 AM   #1
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 485

Rep: Reputation: 39
enabling/disabling specific priority in syslog.conf


Trying to figure out why the following two are treated differently...

Code:
*.warn;\
        kern.!=debug;auth.none;\
        authpriv.none;cron.none;mail.none;news.none     -/var/log/syslog
and

Code:
*.warn;\
        authpriv.none;cron.none;mail.none;news.none;\
        kern.!=debug;auth.none;\                        -/var/log/syslog
According to man syslog.conf "You can specify multiple facilities with the same priority pattern in one statement using the comma (``,'') operator. You may specify as much facilities as you want. Remember that only the facility part from such a statement is taken, a priority part would be skipped."

Can someone confirm that this statement means that kern.!=debug is ignored in the first part because it's priority is not the same as the trailing facilities ending in .none?
 
Old 05-24-2011, 02:36 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
No, they're 2 different things. A line from /etc/syslog.conf broken into tokens looks like :-

Code:
<selector>;<selector>;... <action>
where a <selector> is made up of

Code:
<facility.priority>   (<priority> or higher)
<facility.=priority>  (only <priority>)
<facility.!=priority> ( all priorities except <priority>)
<facility,facility,facility.priority> (as per the section you quoted)
Selectors can be overwritten by a following selector in the same line
eg.
Code:
kern.*;kern.!=debug            -/var/log/messages
All message priorities except debug from the kern facility


I can't see that any of the ones you quoted will affect your 'kern.!=debug' selector.
 
  


Reply


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
[SOLVED] enabling/disabling specific priority in syslog.conf dimm0k Slackware 13 05-18-2011 01:46 PM
Disabling syslog compression gustavoc Linux - Server 1 12-03-2010 08:25 AM
Enabling and Disabling DCA hjazz6 Linux - General 2 04-02-2010 03:08 AM
How can we config to display facility/priority column in syslog output (RHELAS 4) LiXin Linux - Server 5 04-30-2008 12:09 PM
message from syslog: disabling 1rq#21 ylts Linux - Hardware 0 02-21-2005 01:18 PM


All times are GMT -5. The time now is 06:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration