Ignore:
Timestamp:
Aug 16, 2017, 12:53:41 PM (7 years ago)
Author:
Jason Gross <jasongross9@gmail.com>
Branches:
master
Children:
4ead7b3
Parents:
9bfab40
git-author:
Jason Gross <jgross@mit.edu> (07/12/11 16:19:57)
git-committer:
Jason Gross <jasongross9@gmail.com> (08/16/17 12:53:41)
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

    r9bfab40 r5093c6f  
    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.