Log-Mini/README.md
Denis Fedoseev c1172baf97 Checking in changes prior to tagging of version 0.3.0.
Changelog diff is:

diff --git a/Changes b/Changes
index 2d358bf..d84d2af 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,9 @@ Revision history for Perl extension Log-Mini
 
 {{$NEXT}}
 
+0.3.0 2023-03-17T19:35:35Z
+    - Adapter namespace changed
+
 0.2.1 2019-04-18T20:57:59Z
     - Unused imports were removed
2023-03-17 22:35:40 +03:00

1.3 KiB

NAME

Log::Mini - It's a very simple logger which can log your messages to a file or STDERR.

SYNOPSIS

use Log::Mini;

my $logger = Log::Mini->new(); #STDERR logger used by default. Error is default log level
$logger->error('Error message');

my $debug_logger = Log::Mini->new('stderr', level => 'debug'); #STDERR logger used by default
$debug_logger->error('Error message');

my $file_logger = Log::Mini->new(file => 'log_file.log');
$file_logger->info('message to log file');

#prevent buffered output. May slow down your application!
my $synced_file_logger = Log::Mini->get_logger(file => 'log_file.log', synced => 1);

#format message with sprintf
$logger->info('Message with %s %s', 'some', 'additional info');

#log method for better compatibility
$logger->log('info', 'information message');

#Null logger - drops all messages to /dev/null
my $logger = Log::Mini->new('null);
$logger->error('Error message'); #Message will be dropped

DESCRIPTION

Log::Mini is a very simple logger which can log your messages to a file or STDERR. You can have a number of loggers for various log files.

LICENSE

Copyright (C) Denis Fedoseev

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

AUTHOR

Denis Fedoseev denis.fedoseev@gmail.com