diff options
| author | Daniil Fedotov <dfedotov@pivotal.io> | 2015-12-04 17:07:00 +0000 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-01-13 11:43:47 +0100 |
| commit | 670d986641cebf3db4d24c4c18b0cbc8132a9829 (patch) | |
| tree | 900bd93590e80e0f6ee839e44a890063505ec1f8 /src/rabbit.app.src | |
| parent | 636142506ccf1fb65058fe0ae8d997edcc25af65 (diff) | |
| download | rabbitmq-server-git-670d986641cebf3db4d24c4c18b0cbc8132a9829.tar.gz | |
Use Lager to log RabbitMQ messages
By default, RabbitMQ now logs messages to a single file
($RABBITMQ_LOGS). The $RABBITMQ_SASL_LOGS variable is unused. To
configure how and which messages are logged, it's recommended to do it
from rabbitmq.config, not from the environment variable.
The old `log_levels` parameter is unsupported and categories are
replaced by Lager extra sinks. If you had in your rabbitmq.config:
{rabbit, [
{log_levels, [{connection, info}]}
]}
You can now configure Lager like this:
{lager, [
{extra_sinks, [
{rabbit_connection_lager_event, [
{handlers, [{lager_forwarder_backend, [lager_event, info]}]}
]}
]}
]}
rabbitmq-build.mk from rabbitmq-common is included in the top-level
Makefile. It sets the appropriate compiler options to enable Lager's
lager_transform parse_transform module.
rabbit_log calls are now converted by this parse_transform to direct
calls to lager:log(). To keep backward compatibility with other plugins,
the rabbit_log module still implements all the <level>() functions.
Compared to the parse_transformed calls, the main difference is the
logged message does not carry the file:line metadata.
Fixes #94.
Diffstat (limited to 'src/rabbit.app.src')
| -rw-r--r-- | src/rabbit.app.src | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rabbit.app.src b/src/rabbit.app.src index 4ee0191138..f347b24585 100644 --- a/src/rabbit.app.src +++ b/src/rabbit.app.src @@ -9,7 +9,9 @@ rabbit_router, rabbit_sup, rabbit_direct_client_sup]}, - {applications, [kernel, stdlib, sasl, mnesia, rabbit_common, ranch, os_mon, xmerl]}, + %% FIXME: Remove goldrush, once rabbit_plugins.erl knows how to ignore + %% indirect dependencies of rabbit. + {applications, [kernel, stdlib, sasl, mnesia, goldrush, lager, rabbit_common, ranch, os_mon, xmerl]}, %% we also depend on crypto, public_key and ssl but they shouldn't be %% in here as we don't actually want to start it {mod, {rabbit, []}}, |
