[Pkg-privacy-commits] [msva-perl] 231/356: make the logger a little bit more functional
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:41:59 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository msva-perl.
commit 9694510adfb97e7c80112857fa2daa1ad234d336
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Thu Dec 16 15:36:12 2010 -0500
make the logger a little bit more functional
---
Crypt/Monkeysphere/MSVA/Logger.pm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Crypt/Monkeysphere/MSVA/Logger.pm b/Crypt/Monkeysphere/MSVA/Logger.pm
index ab981a4..eae0df0 100644
--- a/Crypt/Monkeysphere/MSVA/Logger.pm
+++ b/Crypt/Monkeysphere/MSVA/Logger.pm
@@ -55,6 +55,25 @@
return $self->{loglevel};
}
+ sub set_log_level {
+ my $self = shift;
+ my $loglevel = shift;
+ my $logval = $loglevels{lc($loglevel)};
+
+ if (defined($logval)) {
+ $self->{loglevel} = $logval;
+ } else {
+ $self->log('error', "Invalid log level: '%s' (log level not changed)\n", $loglevel);
+ }
+ }
+ sub more_verbose {
+ my $self = shift;
+ my $increment = shift;
+
+ $increment = 1
+ if (!defined $increment);
+ $self->{loglevel} += $increment;
+ }
# let the user test to see if we're noisier than this level
# directly:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git
More information about the Pkg-privacy-commits
mailing list