diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ManaTools/Shared/Logging.pm | 24 |
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; |