XAS::Lib::Log::Json - A class for logging with JSON output
This module creates JSON output in the logstash "json_event" format which is then logged to the logs spool directory.
This method initializes the module. It creates a spool object for writing the "json_event".
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 type - 'xas-logs', message - the log line hostname - from the environment host name pid - the pid of the process msgid - 0 priority - converted from XAS log level to syslog priority facility - from the environment log_facility process - from the environment script name
Kevin L. Esteb, <kevin@kesteb.us>
Copyright (c) 2012-2015 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.
To install XAS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAS
CPAN shell
perl -MCPAN -e shell install XAS
For more information on module installation, please visit the detailed CPAN module installation guide.