NAME

eris::log::decoders - Discovery and access for decoders

VERSION

version 0.008

SYNOPSIS

Finds all available and configured decoders, returns an eris::log instance from the raw string.

use Data::Printer;
use eris::log::decoders;

my $dec = eris::decoders->new();

while(<<>>) {
    p( $dec->decode($_) );
}

ATTRIBUTES

namespace

Defaults to 'eris::log::decoder' to add more, configure your search_path

---
decoders:
  search_path:
    - 'my::app::decoders'

METHODS

decode

Takes a raw string and returns a decoded eris::log instance.

Stores the raw message in the raw attribute of the eris::log instance.

Every decoder discovered in the namespace and search_path are then passed the raw string to their decode_message() method. The returned HashRef is recorded in the new eris::log instance.

The timing of the decoding and each individual decoder is recorded with the eris::log add_timing() method. This data is available when the eris::dictionary::eris::debug is enabled. When adding new decoders, it's recommended to enable this dictionary for understanding the performance of the decoder in real world situations.

SEE ALSO

eris::log::contextualizer, eris::role::decoder, eris::log, eris::log::decoder::syslog, eris::log::decoder::json

AUTHOR

Brad Lhotsky <brad@divisionbyzero.net>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Brad Lhotsky.

This is free software, licensed under:

The (three-clause) BSD License