LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 08-31-2016, 03:34 AM   #1
bonowax
Member
 
Registered: Jul 2006
Location: Suburbs of Lisbon, Portugal
Distribution: Slackware, FreeBSD
Posts: 75

Rep: Reputation: 16
OpenBSD - local[0-7] facilities apparently ignored by syslog


Hello everyone, and thanks for reading this post.

I've been trying to set up local facilities in syslog, but to no avail. In syslog.conf I added:

local3.* /var/log/mylog

Then, touched the new logfile and restarted syslog.
Despite this, the line seems to be ignored, as everything ends up in /var/log/messages.
Using 'logger' also proves it: 'logger -p local3.notice Test' will end up in 'messages'.

Using logger for other facility in the default config works as expected: 'logger -p ftp.info Test' will write to 'xferlog', as expected.

Any help or pointer will be much appreciated.

--
Paulo
 
Old 08-31-2016, 04:13 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,295
Blog Entries: 3

Rep: Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719
Check the order of the rules in /etc/syslog.conf

The default in 6.0-current starts with :

Code:
*.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none /var/log/messages
It is catching your "logger" message. Try changing the log level from NOTICE to INFO or something not on that list for it to get routed to /var/log/local3. Or else try readjusting the rules in syslog.conf or their order.
 
1 members found this post helpful.
Old 08-31-2016, 04:36 AM   #3
bonowax
Member
 
Registered: Jul 2006
Location: Suburbs of Lisbon, Portugal
Distribution: Slackware, FreeBSD
Posts: 75

Original Poster
Rep: Reputation: 16
Thank you for your help and time.
I tried to put my local3 definition as the first line in syslog.conf, but still no luck.

Also modified the, now, second line to exclude the local3 facility:

*.notice;local3,auth,authpriv,cron,ftp,kern,lpr,mail,user.none /var/log/messages

...And now my 'logger' tests vanish in the air.

EDIT: I've redone the whole process, several times, and even after upgrading to 6.0, to no avail. All the sudden, I have a working setup. I have no idea what I might have done differently, but everything is working as expected, now. I'll mark the thread as solved.
Thanks, everyone!

Last edited by bonowax; 09-06-2016 at 11:41 AM. Reason: Solved
 
  


Reply

Tags
openbsd, syslog, syslogd



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
syslog - facilities conflict tikit Linux - Server 1 10-30-2009 12:34 PM
How allow external access to local services (smtp-sendmail-syslog) Marv Bon *BSD 3 08-24-2007 11:45 AM
Syslog-ng: Can the number of facilities (local1-7) be increased? Akhran Linux - Newbie 0 10-16-2006 06:08 PM
write to syslog during boot and rc.local turnbui Linux - Newbie 8 07-29-2005 01:30 PM
syslog local facilities mozilla Linux - General 1 03-11-2005 01:10 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

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

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