1.7 Logging

This section describes the Oracle Enterprise Manager for MySQL Database logging. For information on the Oracle Management Service or Management Agent logs, see Locating and Configuring Enterprise Manager Log Files.

Oracle Enterprise Manager Agent uses the log4j library for all agent and plugin logging. The logging configuration is defined by the properties of the log4j.properties file.

Log files specific to the Oracle Enterprise Manager for MySQL Database plugin are written to the following location of your OEM Agent installation:

/plugins/oracle.mysql.omys.agent.plugin_versionNumber/scripts/oracle_omys_database/logs

The log configuration is stored in the following directory of your OEM Agent installation:

/plugins/oracle.mysql.omys.agent.plugin_versionNumber/scripts/oracle_omys_database/etc

where versionNumber is the version of the plugin.

The auto-discovery plugin's logging is also configured by a log4j.properties configuration. By default this file is created in the /plugins/oracle.mysql.omys.discovery.plugin_versionNumber/scripts/oracle_omys_database/etc directory of your Management Agent installation.

The default auto-discovery log output directory is: /plugins/oracle.mysql.omys.discovery.plugin_versionNumber/scripts/oracle_omys_database/logs

versionNumber is the version of the plugin.

The following is an example of the log4j.properties file:

log4j.rootCategory = INFO, file

#log4j.logger.com.mysql.etools.emplugin.collection.availability = DEBUG
#log4j.logger.com.mysql.etools.emplugin.collection.discovery = DEBUG
#log4j.logger.com.mysql.etools.emplugin.collection.assets = DEBUG

log4j.logger.com.mysql.etools.agent.collection.os.StandardHostIdProvider = WARN
log4j.logger.org.springframework.beans.factory.support.DefaultListableBeanFactory = WARN
log4j.logger.org.springframework.context.support.ClassPathXmlApplicationContext = WARN
log4j.logger.org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler = WARN
log4j.logger.com.mysql.etools.schedule.Scheduler = WARN
log4j.logger.org.springframework.beans.factory.xml.XmlBeanDefinitionReader = WARN
log4j.logger.org.springframework.jdbc.support.SQLErrorCodesFactory = WARN
log4j.logger.com.mysql.etools.agent.collection.SigarExecutor = WARN
log4j.logger.org.springframework.jdbc.datasource.SingleConnectionDataSource = WARN
log4j.logger.com.mysql.etools.springboard.Springboard = WARN

log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.layout = org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern = %d %5p [%t:%c] %m%n
log4j.appender.file.Append = true
log4j.appender.file.MaxFileSize = 10MB
log4j.appender.file.MaxBackupIndex = 10
log4j.appender.file.File = ${logging.path}/myoem.log        
      

A general log and collection-type logs are generated for each monitored MySQL instance. The collection-type logs, defined by the log4j.logger.com.mysql.etools.emplugin.collection.* properties, which are commented out by default, log details of availability, metrics, response times, and so on. One log file is generated for each collection type. The general log, defined by the log4j.logger.* properties, logs details of the plugin behavior, errors, status messages and so on. The log files rollover at 10MB and up to 10 files per log type are retained. Logs older than the 10-file limit are deleted.

It is not recommended to edit the log properties unless requested to do so by your Support representative.

The log4j.appender.* properties define the logging properties and output.