++ed by:
DAMS

1 PAUSE user(s)
1 non-PAUSE user(s).

Damien Krotkine

NAME

Log::Message::Structured::Component::Hostname

SYNOPSIS

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

    with qw/
        Log::Message::Structured
        Log::Message::Structured::Component::Hostname
    /;

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

    ... elsewhere ...

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

    $logger->log(message => Event->new( foo => "bar" ));
    # Logs:
    {"__CLASS__":"MyLogEvent","foo":1,"hostname":"mymachine.domain"}

DESCRIPTION

Provides a 'hostname' attribute to the consuming class ( probably Log::Message::Structured).

ATTRIBUTES

hostname

The host name of the host the event was generated on. Defaults to the hostname as returned by Sys::Hostname.

AUTHOR AND COPYRIGHT

Damien Krotkine (dams) <dams@cpan.org>.

LICENSE

Licensed under the same terms as perl itself.




Hosting generously
sponsored by Bytemark