aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-08-05 16:18:01 +0200
committerAngelo Naselli <anaselli@linux.it>2015-08-05 16:18:01 +0200
commita29cbbb563d683caae5dd459715af528c2f3eed0 (patch)
tree04b75c925fe2aa72fa3a6ebd2bcdef1c46b39274 /lib
parent1435dd35e9f18527da90edb0de6e639281a7d2b1 (diff)
downloadmanatools-a29cbbb563d683caae5dd459715af528c2f3eed0.tar
manatools-a29cbbb563d683caae5dd459715af528c2f3eed0.tar.gz
manatools-a29cbbb563d683caae5dd459715af528c2f3eed0.tar.bz2
manatools-a29cbbb563d683caae5dd459715af528c2f3eed0.tar.xz
manatools-a29cbbb563d683caae5dd459715af528c2f3eed0.zip
Added setmask to mask logging level
Diffstat (limited to 'lib')
-rw-r--r--lib/ManaTools/Shared/Logging.pm24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/ManaTools/Shared/Logging.pm b/lib/ManaTools/Shared/Logging.pm
index e2f31eb3..46f102c8 100644
--- a/lib/ManaTools/Shared/Logging.pm
+++ b/lib/ManaTools/Shared/Logging.pm
@@ -159,6 +159,7 @@ sub DEMOLISH {
Sys::Syslog::closelog();
}
+
#=============================================================
=head2 R
@@ -321,6 +322,29 @@ sub D {
$self->S('debug', $s, @para);
}
+#=============================================================
+
+=head2 setmask
+
+=head3 INPUT
+
+ $self: this object
+ $mask: new log mask
+
+=head3 DESCRIPTION
+
+ Sets the log mask for the current process to $mask and returns the old mask.
+ See Sys::Syslog::setlogmask for details.
+
+=cut
+
+#=============================================================
+sub setmask {
+ my ($self, $mask) = @_;
+
+ Sys::Syslog::setlogmask($mask);
+}
+
no Moose;
__PACKAGE__->meta->make_immutable;