The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Adding an Application to syslog.conf
Author: Joe Smith 
Date:   09-06-05 17:43

I have a FreeBSD 4.2 box, and it has a log file called \var\log\export.log. Users export files through the web GUI and this log file contains specifics. It contains information such as when the users exported file.

I want to the box to log the auto_export.log file to a remote syslog server, so I tried configuring syslog.d as follows (yes, I made a backup, and restarted syslogd):

*.* /var/log/export.log
*.* @<ip_address>

Sadly, it doesn't work. I'm guessing that whatever is writing to the export.log file isn't recognized by syslogd as an application. So my question is how do I make syslogd recognize it as a application?

Thank you,

Reply To This Message
 Re: Adding an Application to syslog.conf
Author: parv 
Date:   09-06-05 21:51

DISACLAIMER: I have not personally tried to log messages via syslog*. Following comments are based on reading of various man pages.

syslog.conf(5) refers to syslog(3) if one wants to use "!prog" syntax. The "prog" uses
<code>syslog()</code> function to write one line messages, which are read by syslogd(8) via Unix domain socket.

See following man pages for details: syslogd(8), syslog.conf(5), and syslog(3).

So question, to you, is: are you using the <code>syslog()</code> function in your application to send messages to syslogd?

Alternatively, you may use logger(1).

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum