LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 10:51 AM   #1
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
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, 01:36 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:41 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