Item2008: We provide a logs/ directory, but by default the logs are stored in data/?

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Enhancement Closed Engine    
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/log26 Nov 2014.txt)
  • $Foswiki::cfg{Log}{Dir}/debug%DATE%.log (formerly =data/debug26 Nov 2014.txt)
  • $Foswiki::cfg{Log}{Dir}/error%DATE%.log (formerly =data/warn26 Nov 2014.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

ItemTemplate edit

Summary We provide a logs/ directory, but by default the logs are stored in data/?
ReportedBy AndrewJones
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins distro:5de6e65d1279 distro:0785a4518b30 distro:a60beb8a8161 distro:461624792c8e BlackListPlugin:50b8973b636c UserInfoPlugin:483a15ea8bbc distro:2faa441a7c0f
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r14 - 04 Oct 2010, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License