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

eris::log::contextualizer - Primary interface to the eris log parsing library

VERSION

version 0.008

SYNOPSIS

This objects wraps the decoders and contexts to fully annotate an eris::log instance.

    use Data::Printer;
    use eris::contextualizer;

    my $ctxr = eris::contextualizer->new();

    while( <<>> ) {
        p( $ctxr->parse($_) )
    }

ATTRIBUTES

config

The configuration as a hash reference.

A YAML Representation of the root namespaces for the configuration:

    ---
    contexts: {}
    decoders: {}
    schemas: {}

contexts

An instance of an eris::log::contexts object. Passed the configuration specified in the contexts root key of the config or an empty HashRef

decoders

An instance of an eris::log::decoders object. Passed the configuration specified in the decoders root key of the config or an empty HashRef

METHODS

parse

Takes a raw string.

Builds the list of decoders and contexts, passes the raw string to the eris::log::decoders, which returns an instance of an eris::log object.

Then calls eris::log::contexts, passing that eris::log instance to each.

This method wraps this process w/timing data that's added with the eris::log's add_timing method. This data is available when the eris::dictionary::eris::debug is enabled. This can be helpful for examining parser performance.

SEE ALSO

eris::log, eris::log::decoders, eris::log::contexts

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