Configure and manage logs in Contensis
While Contensis logs and diagnostic information is gathered into a single location, logging levels are still configured against each website and services.
A log level is used to define the scope of the log and to help with analysing logging information. There are five log levels:
- DEBUG – used for development and testing.
- INFO – used for logging state changes; progress of user stories and other processes.
- WARN – used for events which indicate irregular circumstances, but for which there is a clearly-defined recovery strategy and will have no impact on system availability.
- ERROR – used for logging general error information.
- FATAL – used for marking errors which require special attention, or which have no recovery strategy. Also used for marking catastrophic environment issues.
Where are logging levels defined?
Logging levels are set in a config file for each service as a piece of XML. The XML will look like this:
<add key="Contensis_DebugInfoLevel" value="Error" />
Config file locations
CMS UI – [CMS Install Directory]\engine\web.config (typically this would be something like D:\Contensis\engine\web.config)
Published website – From within the CMS UI, you need to edit the CMS config listed against each publishing server in the Management Console. Any changes will need to be published to the website.
Services – Each service has a corresponding config file which can be found on your services server in C:\Program Files (x86)\Contensis\contensis services, (e.g. If you wanted to update the logging level for the publisher you would edit the ContensisPublishingService.exe.config file). Once you have made the change, you need to restart the corresponding Windows service.
Services and associated config
|Contensis Command Processor Service
|Contensis Content Modification Service
|Contensis Content Synchroniser Service
|Contensis Database Replication Service
|Contensis Directory Services Service
|Contensis FTP Cleaner Service
|Contensis Indexing Service
|Contensis Notifications Service
|Contensis PackageManager Service
|Contensis Publishing Service
|Contensis Quality Assurance Service
|Contensis Task Scheduler Service
By default, all errors are logged to the CMS via a webservice http://cms-dev.contensis.com/api/logs and are then stored in the CMS SQL database in the following tables:
- L_Log – Stores the main details about the log entry
- LDT_LogData – Stores any custom data which has been recorded with a log
- LC_LogComponent – Stores the components which have been recorded with the log for searching purposes
If the web service is unavailable then logs are stored on disk at: c:\programdata\contensis\logs. Each log is stored in an individual folder for each application.
Once the web service becomes available, the logs should be picked up and stored in the SQL database. The log files on disk are then automatically deleted.
Disabling logging to the webservice from a front-end site
If you do not want your front-end site logging to the CMS via the web service, this can be switched off and the logs will be saved to disk instead.
- Go to the Management Console, select Project Overview.
- Press Publishing Servers and locate the publishing server you want to disable logging for.
- Click on CMS Config and locate the following value:
<add key="Contensis_EnableLoggingToWebService" value="true" />.
- Set the value to false and press Save & Publish. The CMS config file will be published.
- How often do logs get purged from the system?
- Logs are purged daily by the maintenance script.
- When does the purge occur?
- The maintenance script runs at the start time set against the Maintenance_StartTime global setting in the Management Console.
- What is the retention period of logs?
- The default retention is 14 days. This period can be updated by editing the Log_Retention_Period global setting in the Management Console.
Was this article helpful?