View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Alan Kasindorf > Perlbal > Perlbal::Manual::Logging


Annotate this POD


New  9
Open  3
View/Report Bugs


Perlbal::Manual::Logging - How Perlbal's logging system works


Perlbal 1.78.


Perlbal supports logging of a few messages (and you can log your messages in your plugins, for instance).

This document describes how to achieve that.

IMPORTANT: foreground vs. background

If Perlbal is running on the foreground, it logs by calling printf, which means you should get the logs on STDOUT.

If Perlbal is running on the background, it logs through Sys::Syslog. If Sys::Syslog is not available, there will be no logging, and THAT'S THE MOST IMPORTANT THING TO KNOW ABOUT PERLBAL'S LOGGING SYSTEM.

How to log a message

You can log a message by calling Perlbal::log as you'd call Sys::Syslog's syslog:

    Perlbal::log( $priority, $format, @args );

You should read the documentation for Sys::Syslog for more information, but here's an example:

    Perlbal::log( 'info', 'beginning run' );

And here's another example:

    Perlbal::log( 'crit', "this thing crashed: $!" );

What is logged?

Generating more logs by sending a USR1 signal to perlbal

If you send a USR1 signal to perlbal, that tells it to log some basic statistics to the syslog.

It's similar to connecting to a management service and issue a show service for each service, plus a states and a queues commands.

Where is it logged to?

The way Perlbal opens Sys::Syslog, it logs to /var/log/daemon.log by default.


You can tweek Sys::Syslog's configuration under /etc/syslog.conf. See Sys::Syslog for more details.

syntax highlighting: