Limited support

 

This version of the product is in limited support. However, the documentation is available for your convenience. You will not be able to leave comments. Click here to view the documentation for the current version.

Configuring logs


This topic describes how to configure logs. For information about the available logs, see Contents of the logs.

Log configuration files

The following files configure logging:


Configuration fileLocationDescription
 logback.xml/Apache Software Foundation/Tomcat8.0/external-conf/

Configures ux.log. Edit this file to configure log levels, file size, type of logging, and other settings. 

The  logging mechanism supports multiple logging levels:

  • ERROR
  • WARN
  • INFO
  • DEBUG
  • ALL

For detailed information about the logback.xml file, see the  LOGBack documentation Open link .

 config.js

<InstallDir>/SmartITMyIT/social/

Configuration files for the Social logs. Set the log_level value to

  • DEBUG to log all errors and REST API calls. If social information is missing fro the social logs, use this value for troubleshooting.
  • Error to log only errors

logback_server.xml

<InstallDir>/SmartITMyIT/conf

Configures bundle.log. Edit this file to configure log levels, file size, type of logging, and other settings.

The logging mechanism supports multiple logging levels:

  • ERROR
  • WARN
  • INFO
  • DEBUG
  • ALL

For detailed information about the logback_server.xml file, see the  LOGBack documentation Open link .


Best practice

To troubleshoot a problem, set the log level to DEBUG. After troubleshooting a problem, set the log level to ERROR. If you leave DEBUG enabled, you must monitor log growth and manage it accordingly.
The following video (4:47) demonstrates how you can configure logs in BMC Digital Workplace .

Note

The following video shows an older version of BMC Digital Workplace . The previous product name was MyIT. Although there might be minor changes in the UI, the overall functionality remains the same.

 https://youtu.be/HQXmqoRtsYI

To set the log level

Events are logged in ux.log. To set the log level, perform the following steps:

  1. From the BMC Digital Workplace  and Smart IT server, open the logback.xml file in C:\Program Files\Apache Software Foundation\Tomcat8.0\external-conf.
  2. Find the following line for the default logger, and change the level to DEBUG:

    <logger name="com.bmc.bsm" level="INFO">
       <appender-ref ref="FILE"/>

    </logger>
  3. Find the following line for the error logger, and change the level to DEBUG:

    <logger name="ERROR" level="INFO" additivity="false">
       <appender-ref ref="ERROR-FILE"/>
    </logger>

  4. As needed, set the logging for other components to debug:

    Debug settings
    <!--Optional SQL LOGGER-->
    <if condition='${LOG_SQL_STATEMENTS}'>
       <then>
          <!-- SQL LOGGER -->
          <logger name="SQL" level="DEBUG" additivity="false">
            <appender-ref ref="SQL-FILE"/>
          </logger>
       </then>
    </if>
    
    <!--Optional annotated code logger-->
    <if condition='${LOG_ANNOTATED}'>
       <then>
          <logger name="ANNOTATED" level="DEBUG" additivity="false">
            <appender-ref ref="ANNOTATED-FILE"/>
          </logger>
       </then>
    </if>
    
    <!--Optional Globalsearch logger-->
    <if condition='${LOG_GLOBALSEARCH}'>
       <then>
          <logger name="com.bmc.bsm.myit.service.globalsearch" level="DEBUG" additivity="false">
            <appender-ref ref="GLOBALSEARCH-FILE"/>
          </logger>
       </then>
    </if>
    
    <!--Optional Social logger-->
    <if condition='${LOG_SOCIAL_RESPONSES}'>
       <then>
          <logger name="social.server.debug.logger" level="DEBUG" additivity="false">
            <appender-ref ref="SOCIAL-FILE"/>
          </logger>
       </then>
    </if>
    
    <!-- Measure performance -->
    <logger name="instrumentation" level="DEBUG" additivity="false">
       <appender-ref ref="PERF-FILE"/>
    </logger>
  5. Save the file and restart the Tomcat server.

To configure self-managing logs

The ux.<timeStamp>.part.n.log logs are self-managing according to the settings in logback.xml file.

  1. From the BMC Digital Workplace  and Smart IT server, open the logback.xml file in C:\Program Files\Apache Software Foundation\Tomcat8.0\external-conf.
  2. In the header of the file, modify the following settings:
    • Log file size limit - When the maximum defined log file size is reached, a new log file is created, and the n counter in the log file name is incremented to n+1.
    • Daily or time based rollover
    • Period for number of time-based rollovers
  3. Save the file and restart the Tomcat server.

To configure logging history

The ux.log files record history according to the properties defined in the logback.xml file.To configure logging history, perform the following steps:

  1. From the MyIT server, open the logback.xml file in C:\Program Files\Apache Software Foundation\Tomcat8.0\external-conf.
  2. As needed, configure the following properties to configure the period of time and log file size limit:

    <!-- Period of time. Keep history for number of time based rollovers -->  
    <property name="MAX_HISTORY" value="60"/>
    <!-- Log file size limit -->
    <property name="LOG_FILE_SIZE" value="20MB"/>
  3. Save the file and restart the Tomcat server.

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments