Log::Handler::Plugin::YAML - Config loader for YAML.


Log-Handler documentation Contained in the Log-Handler distribution.

Index


Code Index:

NAME

Top

Log::Handler::Plugin::YAML - Config loader for YAML.

SYNOPSIS

Top

    use Log::Handler::Plugin::YAML;

    my $config = Log::Handler::Plugin::YAML->get_config( $config_file );

ROUTINES

Top

get_config()

Expect the config file name and returns the config as a reference.

CONFIG STYLE

Top

    ---
    file:
      mylog:
        debug_mode: 2
        filename: example.log
        fileopen: 1
        maxlevel: info
        minlevel: warn
        mode: append
        newline: 1
        permissions: 0640
        message_layout: %T %H[%P] [%L] %S: %m
        reopen: 1
        timeformat: %b %d %H:%M:%S

PREREQUISITES

Top

    YAML

EXPORTS

Top

No exports.

REPORT BUGS

Top

Please report all bugs to <jschulz.cpan(at)bloonix.de>.

If you send me a mail then add Log::Handler into the subject.

AUTHOR

Top

Jonny Schulz <jschulz.cpan(at)bloonix.de>.

COPYRIGHT

Top


Log-Handler documentation Contained in the Log-Handler distribution.

package Log::Handler::Plugin::YAML;

use strict;
use warnings;
use YAML;

our $VERSION = '0.03';

sub get_config {
    my ($class, $config_file) = @_;
    my $config = YAML::LoadFile($config_file);
    return $config;
}

1;