Valid for Sitecore
5.1.1 and 5.2
Logs
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:
-

- click to open
a log file;
Note: Some setup may be required to view the log
files. Please, see the
Configuration section.
-

- click to
download currently selected log file in the text form;
-

- click to
delete currently selected file;
-

- click to
refresh the log and see the latest entries.
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:
-
Event source and it’s number (ManagedPoolThread #11).
-
Time when the event occurred (17:04:09).
-
Level of importance (INFO, other options include DEBUG, WARN, ERROR and
FATAL).
-
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:
-
Open the web.config file.
-
Find the <log4net> section and edit the <file value… />
definition. Enter the path to the folder where you want your log files
to be stored.
Below is the sample path definition:
<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