in reply to Perl-based server integration. Looking for example.

for example, it's dead simple to log to syslog, and let the system rotate it's logs, but I think i'd prefer to log to /var/log/daemon/something.log.
You sound if you think that by using syslog, you can't log to /var/log/daemon/something.log. You can.

Abigail

  • Comment on Re: Perl-based server integration. Looking for example.

Replies are listed 'Best First'.
Re: Re: Perl-based server integration. Looking for example.
by Eyck (Priest) on Apr 02, 2004 at 13:07 UTC
    You've got only 'facility' and 'priority' to tell where you're logfiles go. I can use some hand-rolled pattern-matching syslog replacement, maybe syslog-ng to emulate needed behaviour, but I don't think it's a good general solution. In fact, I think it's not.
      There are 7 local facilities, which for most systems is more than enough. Sure, if you intend to run 52 services, who all need to log to a different file, this scheme isn't going to work (although you can always log to a named pipe that does further sorting).

      Abigail

      There is also the ident string that is prepended to every message. Some syslog daemon can filter on that.

      The huge advantage of syslog is that it is standard interface. People can configure logging without worrying about special. The other big advantage is that it does privledge separation and synchronization for logs. Two processes can write to the same log files without worrying about locking or synchronization. A process does not need to have permission to write to the log file since it is isolated by the syslog daemon. Akso, syslog has builtin facilities for remote logging.

      I have heard good things about Log4Perl as a general framework.