GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Appender::RabbitMQ(3) User Contributed Perl Documentation Appender::RabbitMQ(3)

Log::Log4perl::Appender::RabbitMQ - Log to RabbitMQ

version 0.200002

    use Log::Log4perl;

    my $log4perl_config = q{
        log4perl.logger = DEBUG, RabbitMQ

        log4perl.appender.RabbitMQ             = Log::Log4perl::Appender::RabbitMQ
        log4perl.appender.RabbitMQ.exchange    = myexchange
        log4perl.appender.RabbitMQ.routing_key = mykey
        log4perl.appender.RabbitMQ.layout      = Log::Log4perl::Layout::PatternLayout
    };

    Log::Log4perl::init(\$log4perl_config);

    my $log = Log::Log4perl->get_logger();

    $log->warn('this is my message');

This is a Log::Log4perl appender for publishing log messages to RabbitMQ using Net::AMQP::RabbitMQ. Defaults for unspecified options are provided by Net::AMQP::RabbitMQ and can be found in it's documentation.

All of the following options can be passed to the constructor, or be specified in the Log4perl config file. Unless otherwise stated, any options not specified will get whatever defaults Net::AMQP::RabbitMQ provides. See the documentation for that module for more details.

Connection Options

These options are used in the call to Net::AMQP::RabbitMQ::connect() when the appender is created.

user
password
host
Defaults to localhost.
port
vhost
channel_max
frame_max
heartbeat
ssl
ssl_verify_host
ssl_cacert
ssl_init
timeout

Exchange Options

Except for declare_exchange, these options are used in a call to Net::AMQP::RabbitMQ::exchange_declare() to declare the exchange specified on the exchange option (See "Publish Options"). If declare_exchange is false (the default) the exchange will not be declared and must already exist.

declare_exchange
Declare the exchange, or just trust that it already exists? Boolean, defaults to 0.
exchange_type
'direct, 'topic', etc.
durable_exchange
Should the exchange survive a restart? Boolean, defaults to 0.
auto_delete_exchange
Delete the exchange when this proccess disconnects? Boolean, defaults to 1.

Publish Options

These options are used in the call to Net::AMQP::RabbitMQ::publish() for each message.

routing_key
The routing key for messages. If the routing key contains a %c or a %p it will be interpolated for each message. %c will be replaced with the Log4perl category. %p will be replaces with the Log4perl priority.

Defaults to %C

exchange
The exchange to publish the message too. This exchange must already exist unless declare_exchange is set to true.
mandatory
boolean. Flag published messages mandatory.
immediate
boolean. Flag published messages immediate.

This is a subclass of Log::Log4perl::Appender. It overrides the following methods:
new
log

  • Trevor Little <bundacia@tjlittle.com>
  • Alexander Hartmaier <abraxxa@cpan.org>

This software is copyright (c) 2020 by Alexander Hartmaier.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2020-12-22 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.