Roxen.git/
server/
base_server/
configuration.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2018-05-08
2018-05-08 09:24:32 by Karl Gustav Sterneberg <kg@roxen.com>
a683ca57e688c21ba0f762307661833e5268a3d3 (
13
lines) (+
12
/-
1
)
[
Show
|
Annotate
]
Branch:
79e4ae0fa65cac2ad0af6b9c28189e0da70b8241
Logging: Automatic removal of old log files.
[WS-276]
1110:
{ 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;
} }
5206:
"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 "