NAME

Log::Message::Structured::Stringify::AsYAML - YAML log lines

SYNOPSIS

package MyLogEvent;
use Moose;
use namespace::autoclean;

with qw/
    Log::Message::Structured
    Log::Message::Structured::Stringify::AsYAML
/;

has foo => ( is => 'ro', required => 1 );

... elsewhere ...

use aliased 'My::Log::Event';

$logger->log(message => Event->new( foo => "bar" ));

DESCRIPTION

Augments the as_string method provided by Log::Message::Structured, by delegating to the Dump function from YAML::Any module, and thus returning a YAML string.

METHODS

as_string

Returns the event as YAML

AUTHOR AND COPYRIGHT

Tomas Doran (t0m) <bobtfish@bobtfish.net>. Damien Krotkine (dams) <dams@cpan.org>.

LICENSE

Licensed under the same terms as perl itself.