The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

XAS::Log::Format::Logstash - A formatting class for log file handling

SYNOPSIS

 use XAS::Log::Format::Logstash;

 my $formatter = XAS::Log::Format::Logstash->new();
 my $event = $formatter->format($data);

DESCRIPTION

This package will take a hash and format it into a json_event for Logstash.

METHODS

format($data)

This method will add the key fields, convert the @timestamp field into a UTC date while formatting the datetime field into a local date. It returns a json_event string.

$data

The hash to format.

SEE ALSO

XAS::Logmon
XAS

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

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.