Event::RPC::Logger(3pm)

Event::RPC::Logger3pm

Logging facility for event::rpc

Usage

  use Event::RPC::Server;
  use Event::RPC::Logger;
  
  my $server = Event::RPC::Server->new (
      ...
      logger => Event::RPC::Logger->new(
          filename  => "/var/log/myserver.log",
          fh_lref   => [ $fh, $sock ],
          min_level => 2,
      ),
      ...
  );
  $server->start;

Overview

This modules implements a simple logging facility for the Event::RPC framework. Log messages may be written to a specific file and/or a bunch of filehandles, which may be sockets as well.

Options

This is a list of options you can pass to the new() constructor:

filename

All log messages are appended to this file.

fh_lref

All log messages are printed into this list of filehandles.

min_level

This is the minimum log level. Output of messages with a lower level is suppressed. This option may be altered using set_min_level() even in a running server.

Methods

$logger->log ( [$level, ] $msg )

The log() method does the actual logging. Called with one argument the messages gets the default level of 1. With two argumens the first is the level for the message.

$logger->add_fh ( $fh )

This adds a filehandle to the internal list of filhandles all log messages are written to.

$logger->remove_fh ( $fh )

Removes a filehandle.

Releases

10 releases since Debian 4.0 (Etch); the text changed 7 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10–11
  8. 12–13

Authors

  Jörn Reder <joern AT zyn.de>

From libevent-rpc-perl 1.10-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.