Foswiki on GitHub is open for business! Next release meeting: Monday September 29, 1300Z

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/log20 Sep 2014.txt)
  • $Foswiki::cfg{Log}{Dir}/debug%DATE%.log (formerly =data/debug20 Sep 2014.txt)
  • $Foswiki::cfg{Log}{Dir}/error%DATE%.log (formerly =data/warn20 Sep 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
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Priority Enhancement
CurrentState Closed
Checkins Foswikirev:6495 Foswikirev:6506 Foswikirev:6507 Foswikirev:6508 Foswikirev:6509 Foswikirev:6510
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