Return to doc.sitecore.com

Valid for Sitecore 5.1.1 and 5.2
  Logs
Prev Next

To provide Administrators with thorough statistics concerning the activity on a web server, Sitecore records the Log file and the Audit file. The Log file basically lists the actions that have occurred on site, while the Audit file keeps track of user activity.

1.  Log Viewer

 

The Log Viewer is used to open, download and display the Sitecore log files. All log files are stored in the /data/Logs/ folder and have the date as an extension.

The Log Viewer can be accessed in the following way: Sitecore » Administrative Tools » Log Viewer.

2.  Toolbar

The toolbar of the Log Viewer consists of the following buttons:

Note: the Download and Delete buttons are visible even if no file is loaded. They perform no action in this case.

3.  Workspace

The workspace of the Log Viewer consists of lines of text with statistics.

1 ManagedPoolThread #11 17:04:09 INFO  Not due: New Schedule
2 ManagedPoolThread #11 17:04:09 INFO  Not due: Test
3 ManagedPoolThread #11 17:04:09 INFO  Job ended: Sitecore.Tasks.DatabaseAgent (units processed: 3)
4 ManagedPoolThread #12 17:04:09 INFO  Job started: Sitecore.Tasks.TaskDatabaseAgent
5 ManagedPoolThread #12 17:04:09 INFO  Job ended: Sitecore.Tasks.TaskDatabaseAgent

Each line includes the following information:

  1. Event source and it’s number (ManagedPoolThread #11).
  2. Time when the event occurred (17:04:09).
  3. Level of importance (INFO, other options include DEBUG, WARN, ERROR and FATAL).
  4. Short event description (Job ended: Sitecore.Tasks.DatabaseAgent (units processed: 3)).

4.  Configuration

By default the web.config file expects the log files to be in the C:/inetpub/wwwroot/data/logs folder. If Sitecore is installed to a different directory, or you just want your log files to be stored in some other place, certain modifications will be required.

To assign the folder where the log files will be stored, please, do the following:

<log4net>  
 <!-- LOGGING SETTINGS  
   The file element defines the location of the log files. This location
   must be the same as the setting in LogFolder. The file element is an
   absolute path that uses slashes (/) as seperators, e.g.   
   "C:/inetpub/wwwroot/data/logs/log".  
   For further information refer to the Log4Net documentation.  
 -->  
 <appender name="LogFileAppender" type="log4net.Appender.SitecoreLogFileAppender">  

   <file value="C:/Inetpub/wwwroot/Sitecore/v5.0.7.1/data/Logs" />  
 … 
</log4net>

Note: it is recommended to enter the full path instead of relative path here. The word Log in the end is not a subfolder, but the name prefix for the log files.

To assign the folder where the log files will be read from, please, do the following:

5.  Viewing a Log

After configuration is finished you can open the Log file in Log Viewer. On course, at least some actions with the content should be performed, otherwise no log will be recorded.

 

Click the Open a Log File button and select a log you wish to open.

If you don’t see the list of log files, please make sure that you’ve specified the appropriate paths in web.config file correctly (see Configuration section).

When the log is open, there are two more actions available:

 

Download the Selected File – click to download the selected file in the text format.

 

Delete the Selected File – click to delete the selected file.


Prev Next