Item2008: We provide a logs/
directory, but by default the logs are stored in data/
?
Priority: Enhancement
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
If the default is to store the logs in
data/
, why do we provide the
logs/
directory?
I suggest that we set the default directory for the log files as
logs/
, as it seems a better place to store these.
--
AndrewJones - 07 Sep 2009
Looking into this further, I guess its because we don't have
$Foswiki::cfg{LogDir}
, so we use
$Foswiki::cfg{DataDir}
. Perhaps we could define a
$Foswiki::cfg{LogDir}
, and move the individual settings for files (i.e.
$Foswiki::cfg{ConfigurationLogName}
,
$Foswiki::cfg{DebugFileName}
, etc) into EXPERT.
This would mean there are less options in
configure
, which can only be good. I doubt many people have the need to change the names of the log files anyway.
--
AndrewJones - 15 Sep 2009
text for release notes:
Changes to logging support
Log files are now stored in
$Foswiki::cfg{Log}{Dir}
, which defaults to
$Foswiki::cfg{WorkingDir}/logs
(i.e.
working/logs
). The value of
$Foswiki::cfg{Log}{Dir}
can be changed in
configure
. Names of the individual logs have been hard-coded to:
-
$Foswiki::cfg{Log}{Dir}/events%DATE%.log
(formerly =data/log23 Apr 2024.txt)
-
$Foswiki::cfg{Log}{Dir}/debug%DATE%.log
(formerly =data/debug23 Apr 2024.txt)
-
$Foswiki::cfg{Log}{Dir}/error%DATE%.log
(formerly =data/warn23 Apr 2024.txt)
-
$Foswiki::cfg{Log}{Dir}/configure.log
(formerly =data/configurationlog.txt)
The change to the name of the
warn
log reflects its use as a general error
message repository. As far as possible in the core code, messages printed to
STDERR are also printed to this log.
Note also that the options to enable logging for different actions e.g.
$Foswiki::cfg{Log}{view}
have been moved down a level in
configure
- they are now in
$Foswiki::cfg{Log}{Actions}{view}
etc.
configure
should automatically pick up the old settings when you run it after the upgrade.
--
CrawfordCurrie - 23 Feb 2010
PLEASE, PLEASE do not have log names with spaces.... They are a disaster...
--
PadraigLennon - 24 Feb 2010
Sorry, that was an artifact of %DATE% being expanded on this page.
The new reality is that logs are stored in the plain-name log file for each complete month, and then rotated off into a dated logfile. For example, if you started loggin today (9th March) then your events will be logged to events.log. On 1st April, that will be renamed events201003.log, and events.log will be restarted. Also, if you have an existing
LocalSite.cfg with names for log files, then it will default to using the old logger (with locations in
data
) until you choose to change.
--
CrawfordCurrie - 09 Mar 2010