Changeset 42779f8 for perl


Ignore:
Timestamp:
Aug 16, 2017, 12:53:41 PM (7 years ago)
Author:
Jason Gross <jasongross9@gmail.com>
Branches:
master
Children:
03fbf66
Parents:
4ead7b3
git-author:
Jason Gross <jgross@mit.edu> (07/12/11 17:40:48)
git-committer:
Jason Gross <jasongross9@gmail.com> (08/16/17 12:53:41)
Message:
Moved logging-specific variables to perl

But only the ones that could be moved losslessly, i.e., no special
validsettings and not enums.
File:
1 edited

Legend:

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

    r4ead7b3 r42779f8  
    3535
    3636$BarnOwl::Hooks::newMessage->add("BarnOwl::Logging::log");
     37$BarnOwl::Hooks::startup->add("BarnOwl::Logging::_register_variables");
     38
     39sub _register_variables {
     40    BarnOwl::new_variable_bool('logging',
     41        {
     42            default     => 0,
     43            summary     => 'turn personal logging on or off',
     44            description => "If this is set to on, personal messages are\n"
     45                         . "logged in the directory specified\n"
     46                         . "by the 'logpath' variable.  The filename in that\n"
     47                         . "directory is derived from the sender of the message."
     48        });
     49
     50    BarnOwl::new_variable_bool('classlogging',
     51        {
     52            default     => 0,
     53            summary     => 'turn class logging on or off',
     54            description => "If this is set to on, class messages are\n"
     55                         . "logged in the directory specified by the\n"
     56                         . "'classpath' variable.  The filename in that\n"
     57                         . "directory is derived from the class to which\n"
     58                         . "the message was sent."
     59        });
     60
     61    BarnOwl::new_variable_string('logfilter',
     62        {
     63            default     => '',
     64            summary     => 'name of a filter controlling which messages to log',
     65            description => "If non empty, any messages matching the given filter will be logged.\n"
     66                         . "This is a completely separate mechanism from the other logging\n"
     67                         . "variables like logging, classlogging, loglogins, loggingdirection,\n"
     68                         . "etc.  If you want this variable to control all logging, make sure\n"
     69                         . "all other logging variables are in their default state."
     70        });
     71
     72    BarnOwl::new_variable_bool('loglogins',
     73        {
     74            default     => 0,
     75            summary     => 'enable logging of login notifications',
     76            description => "When this is enabled, BarnOwl will log login and logout notifications\n"
     77                         . "for AIM, zephyr, or other protocols.  If disabled BarnOwl will not print\n"
     78                         . "login or logout notifications."
     79        });
     80}
    3781
    3882=head2 sanitize_filename BASE_PATH FILENAME
Note: See TracChangeset for help on using the changeset viewer.