David Golden > Log-Any-1.032 > Log::Any::Adapter::File

Download:
Log-Any-1.032.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.032   Source  

NAME ^

Log::Any::Adapter::File - Simple adapter for logging to files

VERSION ^

version 1.032

SYNOPSIS ^

    use Log::Any::Adapter ('File', '/path/to/file.log');

    # or

    use Log::Any::Adapter;
    ...
    Log::Any::Adapter->set('File', '/path/to/file.log');

    # with minimum level 'warn'

    use Log::Any::Adapter (
        'File', '/path/to/file.log', log_level => 'warn',
    );

DESCRIPTION ^

This simple built-in Log::Any adapter logs each message to the specified file, with a datestamp prefix and newline appended. The file is opened for append with autoflush on. If flock is available, the handle will be locked when writing.

The log_level attribute may be set to define a minimum level to log.

Category is ignored.

SEE ALSO ^

Log::Any, Log::Any::Adapter

AUTHORS ^

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by Jonathan Swartz and David Golden.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: