That is Solaris syslog.

http://woss.name/2007/06/17/solaris-logging-to-a-separate-loghost-the-easy-way/


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Wednesday, October 05, 2011 6:29 PM
To: rsyslog-users
Subject: Re: [rsyslog] ifdef (loghost) in rsyslog.conf

On Wed, 5 Oct 2011, Lu, Victor  wrote:

> Hi there,
>
> One of the requirement we got is to migrate the log facilities and files in 
> syslog.conf  to rsyslog,conf without any change.  But I found the following 
> ifdef statements are not recognized by rsyslogd. It always comes back with 
> syntax error.
>
> # if a non-loghost machine chooses to have authentication messages
> # sent to the loghost machine, un-comment out the following line:
> #auth.notice                    ifdef(`LOGHOST', /var/log/authlog, @loghost)
>
> mail.debug                      ifdef(`LOGHOST', /var/log/syslog, @loghost)
>
> #
> # non-loghost machines will use the following lines to cause "user"
> # log messages to be logged locally.
> #
> ifdef(`LOGHOST', ,
> user.err                                        /dev/sysmsg
> user.err                                        /var/adm/messages
> user.alert                                      `root, operator'
> user.emerg                                      *
> )
>
> Is there a way to convert them in rsyslog understandable language?

what you are asking for is for rsyslog to look at an environment variable 
from within the config file. As far as I know there is no way to do this.

What I would do is to create two versions of your config file (one if you 
are a loghost and one if you are not) and then have some external config 
management tool use the appropriate config.

out of curiosity, what syslog daemon were you using before? I did not know 
of any that would allow you to do this sort of thing.

David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to