- GELF MESSAGE
- COPYRIGHT AND LICENSE
Dancer2::Logger::Radis - Dancer2 logger engine for Log::Radis
Radis (from Radio and Redis) is a concept of caching GELF messages in a Redis DB. Redis provides a reliable queue via the (B)RPOPLPUSH command. See http://redis.io/commands/rpoplpush for more information about that mechanism.
The implementation of a Radis client is quite simple: just push a GELF message with the LPUSH command onto the queue. A collector fetches the messages from the queue and inserts them into a Graylog2 server, for example.
The current perl implementation is Log::Radis. This module is a simple wrapper for it.
The Redis DB server we should connect to. Defaults to
See "server" in Log::Radis for allowed values.
Re-try connecting to the Redis DB up to reconnect seconds.
0 disables auto-reconnect.
See "reconnect" in Log::Radis for more information.
Re-try connection to the Redis DB every every milliseconds.
See "every" in Log::Radis for more information.
The name of the list, which gelf streams are pushed to. Defaults to
See "queue" in Log::Radis for more information.
log($level, $message, %extras);
Nothing special, just like you'd expect.
logger: 'Radis' engines: logger: Radis: server: 'redis-server:6379' queue: 'my-own-radis-queue'
For allowed options see "ATTRIBUTES".
The log message cannot be formatted like described at "log_format" in Dancer2::Core::Role::Logger. Instead, the additioal values are passed into the GELF message directly. Currently this mapping is hard-coded into this module:
Dancer2 variable | GELF param -------------------------------+----------- $$ | _pid $dsl->app_name | _source $request->id | _http_id $request->user | _http_user $request->address | _http_client $request->method | _http_method $request->path | _http_path $request->protocol | _http_proto $request->header('referer') | _http_referer $request->header('user_agent') | _http_useragent $request->session->id | _session_id
This may change in future.
Please report any bugs or feature requests on the bugtracker website https://github.com/zurborg/libdancer2-logger-radis-perl/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
David Zurborg <firstname.lastname@example.org>
This software is Copyright (c) 2016 by David Zurborg.
This is free software, licensed under:
The ISC License