r62998 - in /trunk/liblog-handler-perl: ./ debian/ lib/Log/ lib/Log/Handler/ lib/Log/Handler/Output/ lib/Log/Handler/Plugin/Config/ t/
carnil-guest at users.alioth.debian.org
carnil-guest at users.alioth.debian.org
Mon Sep 27 12:10:48 UTC 2010
Author: carnil-guest
Date: Mon Sep 27 12:10:12 2010
New Revision: 62998
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=62998
Log:
New upstream release
Modified:
trunk/liblog-handler-perl/ChangeLog
trunk/liblog-handler-perl/META.yml
trunk/liblog-handler-perl/README
trunk/liblog-handler-perl/debian/changelog
trunk/liblog-handler-perl/lib/Log/Handler.pm
trunk/liblog-handler-perl/lib/Log/Handler/Examples.pod
trunk/liblog-handler-perl/lib/Log/Handler/Output/DBI.pm
trunk/liblog-handler-perl/lib/Log/Handler/Output/Email.pm
trunk/liblog-handler-perl/lib/Log/Handler/Output/File.pm
trunk/liblog-handler-perl/lib/Log/Handler/Plugin/Config/Properties.pm
trunk/liblog-handler-perl/t/018-handler-logger.t
Modified: trunk/liblog-handler-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/ChangeLog?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/ChangeLog (original)
+++ trunk/liblog-handler-perl/ChangeLog Mon Sep 27 12:10:12 2010
@@ -1,3 +1,29 @@
+0.66 Released at 2010-09-27.
+ - Roled back again to 0.65 for different reasons.
+ - Fixed some spelling error in POD (RT #60005).
+ - It's not possible any more to create or get
+ more than one logger with get_logger() and
+ create_logger().
+
+0.65_04 Released at 2010-09-07.
+ - Fixed a bug with filter_output in Log::Handler
+ and Log::Handler::Output.
+
+0.65_03 Released at 2010-08-27.
+ - Added option filter (unused since 2008-07-25).
+ - Added method filter().
+
+0.65_02 Released at 2010-08-16.
+ - Rollbacked to 0.65 :-)
+ - Fixed some spelling error in POD (RT #60005).
+ - Added option category that works like filter_caller
+ but it's nicer to configure.
+
+0.65_01 Released at 2010-08-03.
+ - Modified create_logger and get_logger and added
+ the functionalety to create and fetch category loggers.
+ - Fixed some spelling error in POD (RT #60005).
+
0.65 Released at 2010-08-02.
- Modified Log::Handler::Output::DBI. Oracle is unable
to handle "select 1". The statement is changed to
Modified: trunk/liblog-handler-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/META.yml?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/META.yml (original)
+++ trunk/liblog-handler-perl/META.yml Mon Sep 27 12:10:12 2010
@@ -1,6 +1,6 @@
---
name: Log-Handler
-version: 0.65
+version: 0.66
author:
- Jonny Schulz
abstract: Log messages to several outputs.
@@ -29,7 +29,7 @@
provides:
Log::Handler:
file: lib/Log/Handler.pm
- version: 0.65
+ version: 0.66
Log::Handler::Config:
file: lib/Log/Handler/Config.pm
version: 0.07
Modified: trunk/liblog-handler-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/README?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/README (original)
+++ trunk/liblog-handler-perl/README Mon Sep 27 12:10:12 2010
@@ -53,23 +53,18 @@
Or
- # init myapp logger with accessor LOG
+ # create a application wide logger
package MyApp;
- use Log::Handler myapp => "LOG";
-
- LOG->add(screen => { maxlevel => "info" });
- LOG->info("info message");
-
- # import myapp logger with accessor LOG
- package MyApp::Foo;
- use Log::Handler myapp => "LOG";
- LOG->info("info message from MyApp::Foo");
-
- # get myapp logger with get_logger()
- package MyApp::Bar;
+ use Log::Handler;
+ my $log = Log::Handler->create_logger("myapp");
+ $log->add(screen => { maxlevel => "info" });
+ $log->info("info message");
+
+ # get logger with get_logger()
+ package MyApp::Admin;
use Log::Handler;
my $log = Log::Handler->get_logger("myapp");
- $log->info("info message from MyApp::Bar");
+ $log->info("info message from MyApp::Admin");
DESCRIPTION
The "Log::Handler" is a object oriented handler for logging, tracing and
@@ -480,7 +475,7 @@
This option is set to 1 by default.
Take a look to the decription of the method "reload" for more
- informations to this option.
+ information about this option.
filter_message
With this option it's possible to set a filter. If the filter is set
@@ -587,7 +582,7 @@
$log->output("screen-out")->log(message => "foo");
debug_trace
- You can activate a debugger that writes "caller()" informations for
+ You can activate a debugger that writes "caller()" information about
each active log level. The debugger is logging all defined values
except "hints" and "bitmask". Set "debug_trace" to 1 to activate the
debugger. The debugger is set to 0 by default.
@@ -666,7 +661,7 @@
wantarray 0
debug_skip
- This option let skip the "caller()" informations the count of
+ This option let skip the "caller()" information the count of
"debug_skip".
output()
@@ -677,7 +672,7 @@
$log->output($alias)->log(message => "booo");
- For more informations take a look to the option "alias".
+ For more information take a look to the option "alias".
flush()
Call "flush()" if you want to send flush to all outputs that can flush.
@@ -758,7 +753,7 @@
outputs. All other keys ("error_log", "common_log") are used as aliases.
Take a look into the documentation of Log::Handler::Config for more
- informations.
+ information.
reload()
With the method "reload()" it's possible to reload the logging machine.
@@ -885,7 +880,7 @@
set_level()
With this method it's possible to change the log level at runtime.
- To change the log level it's neccessary to use a alias - see option
+ To change the log level it's necessary to use a alias - see option
"alias".
$log->set_level(
@@ -901,10 +896,6 @@
my $log = Log::Handler->create_logger("myapp");
- If you want to create more than one object you can call
-
- my @logger = Log::Handler->create_logger("myapp1", "myapp2", ...);
-
get_logger()
With "get_logger()" it's possible to get a logger that was created with
"create_logger()" or with
@@ -914,59 +905,6 @@
Just call
my $log = Log::Handler->get_logger("myapp");
-
- Or
-
- my @logger = Log::Handler->get_logger("myapp1", "myapp2", ...);
-
-GLOBAL LOG HANDLER
- Since version 0.50 it's possible to define a application logger. This
- means to create a "Log::Handler" object and import it into all modules
- of your project.
-
- use Log::Handler alias => accessor;
-
- The accessor is created into the namespace of the caller and referenced
- to the alias.
-
- If the alias doesn't exists then a new "Log::Handler" object will be
- created.
-
- If no accesseor is set then no accessor is exported into the namespace
- of the caller.
-
- Example:
-
- package MyAPP;
- use strict;
- use warnings;
- use Log::Handler myapp => "LOG";
-
- LOG->config(config => "myapp.conf");
- LOG->info("hello world");
-
- Now you can access the logger after you import it.
-
- package MyAPP::Foo;
- use Log::Handler myapp => "LOG";
-
- LOG->info("message");
-
- If you want to import another accessor name ...
-
- package MyAPP::Bar;
- use Log::Handler myapp => "MYLOG";
-
- MYLOG->info("message");
-
- Another way to get the logger is to call "get_logger()" if you don't
- want to create an accessor.
-
- package MyAPP::Foo::Bar;
- use Log::Handler;
-
- my $log = Log::Handler->get_logger("myapp");
- $log->info("message");
EXAMPLES
Log::Handler::Examples
Modified: trunk/liblog-handler-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/debian/changelog?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/debian/changelog (original)
+++ trunk/liblog-handler-perl/debian/changelog Mon Sep 27 12:10:12 2010
@@ -1,3 +1,9 @@
+liblog-handler-perl (0.66-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com> Mon, 27 Sep 2010 14:09:00 +0200
+
liblog-handler-perl (0.65-1) unstable; urgency=low
[ Salvatore Bonaccorso ]
Modified: trunk/liblog-handler-perl/lib/Log/Handler.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/lib/Log/Handler.pm?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/lib/Log/Handler.pm (original)
+++ trunk/liblog-handler-perl/lib/Log/Handler.pm Mon Sep 27 12:10:12 2010
@@ -55,23 +55,18 @@
Or
- # init myapp logger with accessor LOG
+ # create a application wide logger
package MyApp;
- use Log::Handler myapp => "LOG";
-
- LOG->add(screen => { maxlevel => "info" });
- LOG->info("info message");
-
- # import myapp logger with accessor LOG
- package MyApp::Foo;
- use Log::Handler myapp => "LOG";
- LOG->info("info message from MyApp::Foo");
-
- # get myapp logger with get_logger()
- package MyApp::Bar;
+ use Log::Handler;
+ my $log = Log::Handler->create_logger("myapp");
+ $log->add(screen => { maxlevel => "info" });
+ $log->info("info message");
+
+ # get logger with get_logger()
+ package MyApp::Admin;
use Log::Handler;
my $log = Log::Handler->get_logger("myapp");
- $log->info("info message from MyApp::Bar");
+ $log->info("info message from MyApp::Admin");
=head1 DESCRIPTION
@@ -523,7 +518,7 @@
This option is set to 1 by default.
Take a look to the decription of the method C<reload> for more
-informations to this option.
+information about this option.
=item B<filter_message>
@@ -632,7 +627,7 @@
=item B<debug_trace>
-You can activate a debugger that writes C<caller()> informations for each
+You can activate a debugger that writes C<caller()> information about each
active log level. The debugger is logging all defined values except C<hints>
and C<bitmask>. Set C<debug_trace> to 1 to activate the debugger.
The debugger is set to 0 by default.
@@ -711,7 +706,7 @@
=item B<debug_skip>
-This option let skip the C<caller()> informations the count of C<debug_skip>.
+This option let skip the C<caller()> information the count of C<debug_skip>.
=back
@@ -724,7 +719,7 @@
$log->output($alias)->log(message => "booo");
-For more informations take a look to the option C<alias>.
+For more information take a look to the option C<alias>.
=head2 flush()
@@ -806,7 +801,7 @@
outputs. All other keys (C<error_log>, C<common_log>) are used as aliases.
Take a look into the documentation of L<Log::Handler::Config> for more
-informations.
+information.
=head2 reload()
@@ -937,7 +932,7 @@
With this method it's possible to change the log level at runtime.
-To change the log level it's neccessary to use a alias - see option C<alias>.
+To change the log level it's necessary to use a alias - see option C<alias>.
$log->set_level(
$alias => { # option alias
@@ -953,10 +948,6 @@
my $log = Log::Handler->create_logger("myapp");
-If you want to create more than one object you can call
-
- my @logger = Log::Handler->create_logger("myapp1", "myapp2", ...);
-
=head2 get_logger()
With C<get_logger()> it's possible to get a logger that was created
@@ -967,60 +958,6 @@
Just call
my $log = Log::Handler->get_logger("myapp");
-
-Or
-
- my @logger = Log::Handler->get_logger("myapp1", "myapp2", ...);
-
-=head1 GLOBAL LOG HANDLER
-
-Since version C<0.50> it's possible to define a application logger.
-This means to create a C<Log::Handler> object and import it into
-all modules of your project.
-
- use Log::Handler alias => accessor;
-
-The accessor is created into the namespace of the caller and
-referenced to the alias.
-
-If the alias doesn't exists then a new C<Log::Handler> object
-will be created.
-
-If no accesseor is set then no accessor is exported into the
-namespace of the caller.
-
-Example:
-
- package MyAPP;
- use strict;
- use warnings;
- use Log::Handler myapp => "LOG";
-
- LOG->config(config => "myapp.conf");
- LOG->info("hello world");
-
-Now you can access the logger after you import it.
-
- package MyAPP::Foo;
- use Log::Handler myapp => "LOG";
-
- LOG->info("message");
-
-If you want to import another accessor name ...
-
- package MyAPP::Bar;
- use Log::Handler myapp => "MYLOG";
-
- MYLOG->info("message");
-
-Another way to get the logger is to call C<get_logger()> if you
-don't want to create an accessor.
-
- package MyAPP::Foo::Bar;
- use Log::Handler;
-
- my $log = Log::Handler->get_logger("myapp");
- $log->info("message");
=head1 EXAMPLES
@@ -1114,7 +1051,7 @@
use UNIVERSAL;
use base qw(Log::Handler::Levels);
-our $VERSION = "0.65";
+our $VERSION = "0.66";
our $ERRSTR = "";
# $TRACE and $CALLER_LEVEL are both used as global
@@ -1215,27 +1152,25 @@
}
sub get_logger {
- @_ > 1 || croak 'Usage: Log::Handler->get_logger($app)';
- my $class = shift;
-
- foreach my $logger (@_) {
- if (!exists $LOGGER{$logger}) {
- croak "logger '$logger' does not exists";
- }
- }
-
- return @LOGGER{@_};
+ @_ == 2 || croak 'Usage: Log::Handler->get_logger($app)';
+ my ($class, $logger) = @_;
+
+ if (!exists $LOGGER{$logger}) {
+ croak "logger '$logger' does not exists";
+ }
+
+ return $LOGGER{$logger};
}
sub create_logger {
- @_ > 1 || croak 'Usage: Log::Handler->create_logger($app)';
- my $class = shift;
-
- foreach my $logger (@_) {
+ @_ == 2 || croak 'Usage: Log::Handler->create_logger($app)';
+ my ($class, $logger) = @_;
+
+ if (!exists $LOGGER{$logger}) {
$LOGGER{$logger} = __PACKAGE__->new();
}
- return @LOGGER{@_};
+ return $LOGGER{$logger};
}
sub new {
Modified: trunk/liblog-handler-perl/lib/Log/Handler/Examples.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/lib/Log/Handler/Examples.pod?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/lib/Log/Handler/Examples.pod (original)
+++ trunk/liblog-handler-perl/lib/Log/Handler/Examples.pod Mon Sep 27 12:10:12 2010
@@ -11,49 +11,23 @@
my $log = Log::Handler->new();
$log->add( screen => \%options );
-Create a application logger and accessor LOG
-
- use Log::Handler myapp => "LOG";
-
- LOG->add( screen => \%options );
-
-Create a application logger without accessor
-
- use Log::Handler "myapp";
-
- my $log = Log::Handler->get_logger("myapp");
- $log->add( screen => \%options );
-
-Create application logger with C<create_logger()>
-
- use Log::Handler;
+Create a application wide logger
my $log = Log::Handler->create_logger("myapp");
$log->add( screen => \%options );
-Another self-explanatory examples
-
- use Log::Handler l1 => "LOG1", l2 => "LOG2", l3 => "LOG3";
-
- @logger = Log::Handler->create_logger(qw/l1 l2 l3/);
-
- @logger = Log::Handler->get_logger(qw/l1 l2 l3/);
-
-Once created you can import a application logger into all
+Once created you can use the application logger in all
modules of your project:
package MyApp;
- use Log::Handler myapp => "LOG";
- LOG->add( screen => \%options );
-
- package MyApp::Foo;
- # Import it with an accessor
- use Log::Handler myapp => "LOG";
- LOG->info("message");
-
- package MyApp::Bar;
- use Log::Handler;
- # Import it with get_logger()
+ use Log::Handler;
+
+ my $log = Log::Handler->create_logger("myapp");
+ $log->add( screen => \%options );
+
+ package MyApp::Admin;
+ use Log::Handler;
+
my $log = Log::Handler->get_logger("myapp");
$log->info("message");
Modified: trunk/liblog-handler-perl/lib/Log/Handler/Output/DBI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/lib/Log/Handler/Output/DBI.pm?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/lib/Log/Handler/Output/DBI.pm (original)
+++ trunk/liblog-handler-perl/lib/Log/Handler/Output/DBI.pm Mon Sep 27 12:10:12 2010
@@ -188,7 +188,7 @@
=item B<debug>
-With this option it's possible to enable debugging. The informations can be
+With this option it's possible to enable debugging. The information can be
intercepted with C<$SIG{__WARN__}>.
=back
Modified: trunk/liblog-handler-perl/lib/Log/Handler/Output/Email.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/lib/Log/Handler/Output/Email.pm?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/lib/Log/Handler/Output/Email.pm (original)
+++ trunk/liblog-handler-perl/lib/Log/Handler/Output/Email.pm Mon Sep 27 12:10:12 2010
@@ -88,7 +88,7 @@
=item B<debug>
-With this option it's possible to enable debugging. The informations can be
+With this option it's possible to enable debugging. The information can be
intercepted with $SIG{__WARN__}.
=back
Modified: trunk/liblog-handler-perl/lib/Log/Handler/Output/File.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/lib/Log/Handler/Output/File.pm?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/lib/Log/Handler/Output/File.pm (original)
+++ trunk/liblog-handler-perl/lib/Log/Handler/Output/File.pm Mon Sep 27 12:10:12 2010
@@ -112,7 +112,7 @@
C<trunc> would truncate the complete log file if it exists. Please take care
to use this option.
-Take a look to the documentation of C<sysopen()> to get more informations.
+Take a look to the documentation of C<sysopen()> to get more information.
=item B<autoflush>
@@ -130,7 +130,7 @@
got read and write permissions and users in the same group got only read
permissions. All other users got no access.
-Take a look to the documentation of C<sysopen()> to get more informations.
+Take a look to the documentation of C<sysopen()> to get more information.
=item B<utf8>
Modified: trunk/liblog-handler-perl/lib/Log/Handler/Plugin/Config/Properties.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/lib/Log/Handler/Plugin/Config/Properties.pm?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/lib/Log/Handler/Plugin/Config/Properties.pm (original)
+++ trunk/liblog-handler-perl/lib/Log/Handler/Plugin/Config/Properties.pm Mon Sep 27 12:10:12 2010
@@ -14,7 +14,7 @@
Expect the config file name and returns the config as a reference.
-The configuration will be splitted by dot.
+The configuration uses full stops "." as a delimiter.
=head1 CONFIG STYLE
Modified: trunk/liblog-handler-perl/t/018-handler-logger.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-handler-perl/t/018-handler-logger.t?rev=62998&op=diff
==============================================================================
--- trunk/liblog-handler-perl/t/018-handler-logger.t (original)
+++ trunk/liblog-handler-perl/t/018-handler-logger.t Mon Sep 27 12:10:12 2010
@@ -1,21 +1,18 @@
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 8;
use Log::Handler lhtest1 => 'LOG';
my $COUNT = 0;
ok(1, 'use');
-Log::Handler->create_logger(qw/lhtest2 lhtest3/);
+foreach my $logger (qw/lhtest2 lhtest3/) {
+ Log::Handler->create_logger($logger);
+ ok(1, 'create logger');
-ok(1, 'create logger');
+ my $log = Log::Handler->get_logger($logger);
-my @logger = Log::Handler->get_logger(qw/lhtest1 lhtest2 lhtest3/);
-
-ok(@logger == 3, 'get logger ('. at logger.')');
-
-foreach my $log (@logger) {
$log->add(forward => {
forward_to => sub { $COUNT++ },
maxlevel => 'info',
@@ -27,5 +24,5 @@
ok(1, 'log');
}
-ok($COUNT == 3, "check counter ($COUNT)");
+ok($COUNT == 2, "check counter ($COUNT)");
More information about the Pkg-perl-cvs-commits
mailing list