Changeset 023f405


Ignore:
Timestamp:
Jan 7, 2014, 6:02:21 PM (8 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
1210b54
Parents:
bf61c61
git-author:
Jason Gross <jgross@mit.edu> (07/12/11 17:40:48)
git-committer:
Jason Gross <jgross@mit.edu> (01/07/14 18:02:21)
Message:
Moved logging-specific variables to perl

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

Legend:

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

    rbf61c61 r023f405  
    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
  • variable.c

    r7dcef03 r023f405  
    136136               "load logins from .anyone on startup", "" );
    137137
    138   OWLVAR_BOOL( "logging" /* %OwlVarStub */, 0,
    139                "turn personal logging on or off",
    140                "If this is set to on, personal messages are\n"
    141                "logged in the directory specified\n"
    142                "by the 'logpath' variable.  The filename in that\n"
    143                "directory is derived from the sender of the message.\n" );
    144 
    145   OWLVAR_BOOL( "classlogging" /* %OwlVarStub */, 0,
    146                "turn class logging on or off",
    147                "If this is set to on, class messages are\n"
    148                "logged in the directory specified\n"
    149                "by the 'classlogpath' variable.\n"
    150                "The filename in that directory is derived from\n"
    151                "the name of the class to which the message was sent.\n" );
    152 
    153138  OWLVAR_ENUM( "loggingdirection" /* %OwlVarStub */, OWL_LOGGING_DIRECTION_BOTH,
    154139               "specifies which kind of messages should be logged",
     
    185170               "Enable printing of login notifications",
    186171               "When this is enabled, BarnOwl will print login and logout notifications\n"
    187                "for AIM, zephyr, or other protocols.  If disabled BarnOwl will not print\n"
    188                "login or logout notifications.\n");
    189 
    190   OWLVAR_STRING( "logfilter" /* %OwlVarStub */, "",
    191                  "name of a filter controlling which messages to log",
    192 
    193                  "If non empty, any messages matching the given filter will be logged.\n"
    194                  "This is a completely separate mechanism from the other logging\n"
    195                  "variables like logging, classlogging, loglogins, loggingdirection,\n"
    196                  "etc.  If you want this variable to control all logging, make sure\n"
    197                  "all other logging variables are in their default state.\n");
    198 
    199   OWLVAR_BOOL( "loglogins" /* %OwlVarStub */, 0,
    200                "Enable logging of login notifications",
    201                "When this is enabled, BarnOwl will log login and logout notifications\n"
    202172               "for AIM, zephyr, or other protocols.  If disabled BarnOwl will not print\n"
    203173               "login or logout notifications.\n");
Note: See TracChangeset for help on using the changeset viewer.