package MyLogEvent; use Moose; use namespace::autoclean; with qw/ Log::Message::Structured Log::Message::Structured::Stringify::AsSereal /; has foo => ( is => 'ro', required => 1 ); ... elsewhere ... use aliased 'My::Log::Event'; $logger->log(message => Event->new( foo => "bar" )); # Logs: "some_base_64_string"
as_string method provided by Log::Message::Structured, by delegating to the
encode from Sereal::Encoder module, then encoding it using MIME::Base64. Thus, the return value is a base64 string of the Sereal encoded version of the hash structure of the log message.
See Log::Message::Structured for more information.
Returns the event as a Base64 encoded string representing the Sereal encoded hash structure of the log message.
Log::Message::Structured::Stringify::AsSereal - Sereal-encoded base64'ed log lines
Damien "dams" Krotkine
This software is copyright (c) 2013 by Damien "dams" Krotkine.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.