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

Util::Logger - Thread-safe logging

VERSION

This documentation describes version 0.01

SYNOPSIS

 use Util::Logger;
 
 my $time = 'utc' if open my $handle, '>>', '/some/path';

 my $logger = Util::Logger->new
 (
     log => $handle, ## path or I/O handle, *STDOUT if undef
     time => $time,  ## 'raw', 'utc', 'local', omit timestamp if undef
 );

 $logger->write( "timestamp in %s", $time );

METHODS

write

See printf().

AUTHOR

Kan Liu

COPYRIGHT and LICENSE

Copyright (c) 2010. Kan Liu

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.