Changeset 03fbf66


Ignore:
Timestamp:
Aug 16, 2017, 12:53:41 PM (7 years ago)
Author:
Jason Gross <jasongross9@gmail.com>
Branches:
master
Children:
94b4b99e
Parents:
42779f8
git-author:
Jason Gross <jgross@mit.edu> (07/12/11 19:08:45)
git-committer:
Jason Gross <jasongross9@gmail.com> (08/16/17 12:53:41)
Message:
Moved the last of the logging-related variables to perl

We seem to have picked logpath as the string variable we test in
tester.c.  Since this is no longer in C, I've replaced it with
personalbell (no particular reason for that choice).
Files:
3 edited

Legend:

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

    r42779f8 r03fbf66  
    7777                         . "for AIM, zephyr, or other protocols.  If disabled BarnOwl will not print\n"
    7878                         . "login or logout notifications."
     79        });
     80
     81    BarnOwl::new_variable_enum('loggingdirection',
     82        {
     83            default       => 'both',
     84            validsettings => [qw(in out both)],
     85            summary       => "specifies which kind of messages should be logged",
     86            description   => "Can be one of 'both', 'in', or 'out'.  If 'in' is\n"
     87                           . "selected, only incoming messages are logged, if 'out'\n"
     88                           . "is selected only outgoing messages are logged.  If 'both'\n"
     89                           . "is selected both incoming and outgoing messages are\n"
     90                           . "logged."
     91        });
     92
     93    BarnOwl::new_variable_string('logpath',
     94        {
     95            default       => '~/zlog/people',
     96            validsettings => '<path>',
     97            summary       => 'path for logging personal messages',
     98            description   => "Specifies a directory which must exist.\n"
     99                            . "Files will be created in the directory for each sender."
     100        });
     101
     102    BarnOwl::new_variable_string('classlogpath',
     103        {
     104            default       => '~/zlog/class',
     105            validsettings => '<path>',
     106            summary       => 'path for logging class zephyrs',
     107            description   => "Specifies a directory which must exist.\n"
     108                           . "Files will be created in the directory for each class."
    79109        });
    80110}
  • tester.c

    r21dc927 r03fbf66  
    357357
    358358
    359   FAIL_UNLESS("get string var", NULL != (var = owl_variable_get_var(&vd, "logpath")));
    360   FAIL_UNLESS("get string", 0 == strcmp("~/zlog/people", owl_variable_get_string(var)));
     359  FAIL_UNLESS("get string var", NULL != (var = owl_variable_get_var(&vd, "personalbell")));
     360  FAIL_UNLESS("get string", 0 == strcmp("off", owl_variable_get_string(var)));
    361361  FAIL_UNLESS("set string 7", 0 == owl_variable_set_string(var, "whee"));
    362362  FAIL_UNLESS("get string", !strcmp("whee", owl_variable_get_string(var)));
  • variable.c

    r42779f8 r03fbf66  
    135135  OWLVAR_BOOL( "loginsubs" /* %OwlVarStub */, 1,
    136136               "load logins from .anyone on startup", "" );
    137 
    138   OWLVAR_ENUM( "loggingdirection" /* %OwlVarStub */, OWL_LOGGING_DIRECTION_BOTH,
    139                "specifies which kind of messages should be logged",
    140                "Can be one of 'both', 'in', or 'out'.  If 'in' is\n"
    141                "selected, only incoming messages are logged, if 'out'\n"
    142                "is selected only outgoing messages are logged.  If 'both'\n"
    143                "is selected both incoming and outgoing messages are\n"
    144                "logged.",
    145                "both,in,out");
    146137
    147138  OWLVAR_BOOL_FULL( "colorztext" /* %OwlVarStub */, 1,
     
    184175                    "off,middle,on",
    185176                    NULL, owl_variable_disable_ctrl_d_set, NULL);
    186 
    187   OWLVAR_PATH( "logpath" /* %OwlVarStub */, "~/zlog/people",
    188                "path for logging personal zephyrs",
    189                "Specifies a directory which must exist.\n"
    190                "Files will be created in the directory for each sender.\n");
    191 
    192   OWLVAR_PATH( "classlogpath" /* %OwlVarStub:classlogpath */, "~/zlog/class",
    193                "path for logging class zephyrs",
    194                "Specifies a directory which must exist.\n"
    195                "Files will be created in the directory for each class.\n");
    196177
    197178  OWLVAR_PATH( "debug_file" /* %OwlVarStub */, OWL_DEBUG_FILE,
Note: See TracChangeset for help on using the changeset viewer.