The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Log::Handler::Changes - Changes from 0.38 to 0.45.

WHAT IS NEW, WHAT IS DEPRECATED

More than one output

Since version 0.40 the method add() is totaly new. With this method you can add outputs as much as you wish, each with its own level range and different other options. As example you can add a output for the levels 0-4 (emergency-warning) and another output for the levels 4-7 (warning-debug). Each output is handled as a own object.

Outputs

There are different output modules available:

    Log::Handler::Output::DBI
    Log::Handler::Output::Email
    Log::Handler::Output::File
    Log::Handler::Output::Forward
    Log::Handler::Output::Screen
    Log::Handler::Output::Socket

You can add the outputs on different ways. Take a look to the further documentation of Log::Handler.

Message layout

Placeholders are now available for the message layout in printf() style. The old style of <--LEVEL--> is deprecated and you should use %L instead. The layout can be defined with the option message_layout.

The option prefix is deprecated.

Configuration file

Now it's possible to load the configuration from a file. There are 3 configuration plugins available:

    Config::General
    Config::Properties
    YAML

Take a look into the documentation for Log::Handler::Config.

New options

    dateformat
    priority
    message_pattern
    prepare_message
    filter_message
    filter_caller
    alias

Changed options

    prefix  is now  message_layout
    debug   is now  debug_trace

Kicked options

    rewrite_to_stderr

New methods

    add()           to add new outputs
    config()        to load outputs from a configuration file
    set_pattern()   to create your own placeholder
    output()        to get a output object with an alias
    flush()         to flush all outputs

New level methods

Please take a look to Log::Handler::Levels because the list is very long.

Kicked methods

    note()
    close()
    get_prefix()
    set_prefix()

Backward compatibilities

As I re-designed Log::Handler it was my wish to support all things from version 0.38.

    my $log = Log::Handler->new(filename => 'file.log');

This is still running fine. It creates a Log::Handler::Simple object with all features of Log::Handler from version 0.38.

Further releases

Extensions and changes are planed. I hope I have enough time to implement my ideas as soon as possible!

AUTHOR

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