Ignore:
Timestamp:
Jan 7, 2014, 6:02:20 PM (8 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
bf61c61
Parents:
f511c1e
git-author:
Jason Gross <jgross@mit.edu> (07/12/11 16:19:57)
git-committer:
Jason Gross <jgross@mit.edu> (01/07/14 18:02:20)
Message:
Moved the checking of whether or not to log messages to perl
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Message.pm

    rf511c1e r6e764aa  
    225225    chomp $body;
    226226    return "ERROR (BarnOwl): $recipient\n$body\n\n";
     227}
     228
     229=head2 should_log MESSAGE
     230
     231Returns true if we should log C<MESSAGE>.  This does not override
     232user settings; if the BarnOwl variable C<loggingdirection> is in,
     233and C<MESSAGE> is outgoing and does not match the C<logfilter>, it
     234will not get logged regardless of what this method returns.
     235
     236Note that this method I<does> override the BarnOwl C<logging>
     237variable; if a derived class overrides this method and does not
     238provide an alternative BarnOwl variable (such as C<classlogging>),
     239the overriding method should check the BarnOwl C<logging> variable.
     240
     241Defaults to returning the value of the BarnOwl variable C<logging>.
     242
     243=cut
     244
     245sub should_log {
     246    return BarnOwl::getvar('logging') eq 'on';
    227247}
    228248
Note: See TracChangeset for help on using the changeset viewer.