Login/Register
  • Home
  • Community
  • Knowledge
  • Technical Docs
  • RWS Support Policy
  • Trados Studio Licensing Help
  • Login for Support
Back to Search Results

Tridion Sites 9.6 - Configuring logging for Content Manager Explorer with NLog logging.

000020130 |1/25/2023 5:36 PM
Scope/Environment
Tridion Sites
Symptoms/Context

Beginning in Tridion Sites 9.6, Content Manager uses the NLog logging platform instead of the logging mechanism provided by Microsoft Enterprise Library.

NLog can be configured to troubleshoot Content Manager Explorer issues as well.

 

Resolution

To change the detail level of the log messages or any other aspect of logging, modify the NLog.config file.

By default, the log level is set to Warn, which means that warnings, as well as critical and non-critical errors, are logged.
 

Procedure

  1. On the Content Manager server machine, go to the following location: %Tridion_Home/web/WebUI/WebRoot/bin
  2. Open NLog.config for editing in a plain-text or XML editor.
  3. Locate the <logger name="*"/> element and add a new logger name that writes to "fileTarget", then change the value of minlevel attribute to one of the following values (eg: Debug):
  4. <rules>
        <logger name="Tridion.SentinelCloudConnect.Client.Logger" minlevel="Warn" writeTo="sentinelCloudConnectFileTarget" final="true" />
    	<logger name="*" minlevel="Warn" writeTo="eventlog" />
        <logger name="*" minlevel="Debug" writeTo="fileTarget" />
      </rules>
     
    Log LevelDescription
    TraceFor tracing the program flow and performing the finest level of debugging–logs messages with the highest level of detail about the application's lowest-level activity.
    DebugFor normal debugging–logs fine-grained messages about low-level functionality being executed, intended to discover the source of a problem.
    InfoLogs information messages related to normal activity and user behavior, plus all warnings and errors.
    WarnLogs warnings of unexpected events as well as all errors.
    ErrorLogs all errors–both fatal events and non-fatal errors.
    FatalLogs only critical errors, that is, events that cause the system to go down.

    For more information on all NLog settings, refer to the NLog documentation on log levels.
  5. By default, log messages are logged both to console and to file, and the file target is a rolling log, producing a new file every 1,000,000 bytes.You can modify this behavior by changing the following settings:
    • Logging locations
    • Log file names
    • Log message format

    For more information on all NLog settings and features, refer to the NLog configuration file documentation.

  6. To debug issues specific to Content Manager, and a new <"target"> element with a "name" matching the "writeTo" element from the previous step and specify the location and name within the fileName parameter:
  7. <targets>
        <target xsi:type="File"
                name="sentinelCloudConnectFileTarget"
                archiveAboveSize="1000000"
                fileName="${environment:TRIDION_HOME}/log/SCC/${processname}_${shortdate}.log"
                bufferSize="4096"
                keepFileOpen="true"
                autoFlush="false"
                openFileFlushTimeout="10"
                layout="${longdate}|${level:uppercase=true}|${processid}|${event-properties:item=component}|${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=10}"/>
        <target xsi:type="EventLog"
                name="eventlog"
                source="Tridion ${event-properties:category}"
                log="Tridion"
                layout="${message}${newline}${newline}Component: ${logger}${newline}Errorcode: ${event-properties:errorcode}${newline}User: ${windows-identity}${newline}${newline}${exception:format=ToString}"/>
    	<target xsi:type="File"            
    			name="fileTarget"            
    			archiveAboveSize="1000000"            
    			fileName="c:/logs/NLog/${processname}_${shortdate}.log"           
    			bufferSize="4096"            
    			keepFileOpen="true"            
    			autoFlush="false"            
    			openFileFlushTimeout="10"            
    			layout="${longdate}|${level:uppercase=true}|${processid}|${event-properties:item=component}|${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=10}"/>
      </targets>
  8. Save and close NLog.config.
Root Cause
Reference
Configuring the Content Manager server
Send Article Feedback
RWS Machine Translation Translation Software Language Services Content Management
All Contents Copyright © RWS.
COPYRIGHT PRIVACY POLICY COOKIE POLICY TERMS AND CONDITIONS