NAME
XAS::Lib::Modules::Log::Logstash - A mixin class for logging
DESCRIPTION
This module is a mixin for logging. It creates a logstash "json_event" which is then logged to the logstash spool directory.
METHODS
init_log
This method initializes the module. It creates a spool object for writing the "json_event".
output($hashref)
This method formats the hashref and writes out the results. The JSON data structure has the following fields:
@timestamp - current time in GMT
@version - 1
@message - the line that would have gone to a log file
message - the log line
hostname - the hostname
pid - the pid of the process
msgid - message id
priority - the priority from -priority
facility - the facility from -facility
process - the process from -process
destroy
This methods deinitializes the module.
SEE ALSO
AUTHOR
Kevin L. Esteb, <kevin@kesteb.us>
COPYRIGHT AND LICENSE
Copyright (C) 2014 Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
See http://dev.perl.org/licenses/ for more information.