GitXplorerGitXplorer
h

rabbitmq-lager

public
8 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
891bf2479f05914be8d796b822be9e3d338c3979

Merge pull request #1 from gotthardp/erlang.mk

hhyperthunk committed 9 years ago
Unverified
fcf045d03ee5519a73435d6dc5954941b4a427c0

Switch to erlang.mk for compliance with the RabbitMQ 3.6.x

ggotthardp committed 9 years ago
Unverified
adfb2770365494ffe895b56d4240482cac359a0c

tweak readme

committed 12 years ago
Unverified
804a5a2e999499e016bc9adc6ae039009793bc4c

rename to 'lager' only

committed 12 years ago
Unverified
8b8f97c575c8477ea837788e35e295b6dde14d31

update link to binary download

committed 12 years ago
Unverified
6e1f10e352296cc11e111adcdd9bceaf27223092

update README to include correct binary erts vsn

committed 12 years ago

README

The README file for this repository.

RabbitMQ Lager (Logging) Integration

This repository provides a means to integrate the lager logging framework into RabbitMQ as a plugin.

Usage

To activate the plugin, use the rabbitmq-plugins command line tool:

$ rabbitmq-plugins enable lager

For further documentation, see http://www.rabbitmq.com/plugins.html and man rabbitmq-plugins.

To configure the plugin, set the relevant section of your RabbitMQ config file using the key lager:

[{rabbit, [...]},
 {lager, [
     {handlers, [
       {lager_console_backend, info},
       {lager_file_backend, [
         {"/var/log/rabbitmq/error.log", error, 10485760, "$D0", 5},
         {"/var/log/rabbitmq/console.log", info, 10485760, "$D0", 5}
       ]}
     ]}
   ]}
 ].

For further documentation, see http://www.rabbitmq.com/configure.html and http://www.erlang.org/doc/man/config.html.

A note about custom formatting

Whilst lager supports custom formatting, RabbitMQ currently logs directly to the error_logger, and this plugin simply starts the lager application so that its built-in error_logger redirection kicks in and routes log messages to lager instead of the default handlers. Because RabbitMQ is not using lager's logging APIs however, metadata that is usually inserted by the lager parse_transform will not be present and therefore any custom formatting rules added to log handlers should provide a fallback if possible. See the documentation at https://github.com/basho/lager#custom-formatting for more details.

Installation

A binary release of the plugin, compiled against R14B03 is available for download from github:

$ curl -O https://raw.github.com/hyperthunk/rabbitmq-lager/binary-dist/lager-2.0.0.ez

The binary artefact should be placed into your plugins directory and should then be visible via the rabbitmq-plugins list command.

Installation from source

Should you wish to compile the plugin yourself, then the following actions should be enough to get you up and running.

$ hg clone http://hg.rabbitmq.com/rabbitmq-public-umbrella
$ cd rabbitmq-public-umbrella
$ make co
$ git clone git://github.com/hyperthunk/rabbitmq-lager.git lager
$ cd lager
$ make

The built artefact will be located beneath the ./dist folder.

License

This package is dual-licensed under the MPL and Apache Licence v2. Please see the LICENSE file for more details.