Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1103:   }      void init_log_file()   {    end_logger();    // Only try to open the log file if logging is enabled!!    if(query("Log"))    {    string logfile = query("LogFile");    if(strlen(logfile)) -  log_function = roxen.LogFile(logfile, query("LogFileCompressor"))->write; +  log_function = roxen.LogFile(logfile, +  query("LogFileCompressor"), +  [int] query("DaysToKeepLogFiles"))->write;    }   }      private void parse_log_formats()   {    array foo=query("LogFormat")/"\n";    log_format = ([]);    foreach(foo; int i; string b)    if(strlen(b) && b[0] != '#') {    if (sscanf (b, "%d:%*[\t ]%s", int status, b))
Roxen.git/server/base_server/configuration.pike:5199:    "<b>Note&nbsp;1:</b> The active log file is never compressed. "    "Log rotation needs to be used using the \"Log file\" "    "filename substitutions "    "(e.g. <tt>$LOGDIR/mysite/Log.%y-%m-%d</tt>). "    "<b>Note&nbsp;2:</b> Compression is limited to scanning files "    "with filename substitutions within a fixed directory (e.g. "    "<tt>$LOGDIR/mysite/Log.%y-%m-%d</tt>, "    "not <tt>$LOGDIR/mysite/%y/Log.%m-%d</tt>)."),    0, lambda(){ return !query("Log");});    +  defvar("DaysToKeepLogFiles", 0, +  DLOCALE(0, "Logging: Number of days to keep log files"), TYPE_INT, +  DLOCALE(0, "Log files in the log directory older than specified number of " +  "days will automatically be deleted. Set to <tt>0</tt> (<tt>zero</tt>) " +  "to disable and keep log files forever. Currently active log file will " +  "never be deleted, nor will files with names not matching the pattern " +  "specified under <b>Log file</b>.")); +     defvar("NoLog", ({ }),    DLOCALE(32, "Logging: No Logging for"), TYPE_STRING_LIST|VAR_MORE,    DLOCALE(33, "Don't log requests from hosts with an IP number which "    "matches any of the patterns in this list. This also affects "    "the access counter log."),    0, lambda(){ return !query("Log");});       defvar("JSONLogEndpoints", ({ "$JSONLOGDIR/" + Roxen.short_name(name) + ".jsonlog" }),    DLOCALE(1076, "Logging: JSON Logging endpoints"), TYPE_STRING_LIST,    DLOCALE(1077, "Socket paths and/or IP:ports to bind for log output from this configuration. "