Use case:  Something strange is happening in my Semarchy xDM application and I want to see the details of what happened...

Step-by-step guide

  1. Enable Logging:
    v4: In the Semarchy xDM Workbench, go to the Administration Console perspective, and select Logging Configuration (details of the available loggers are listed in the table at the end of this article).

    v5: On the Semarchy Welcome page, click on the Configuration Button. Select Logging Configuration


    # These comments do not appear in your Semarchy Logging Configuration
    # But the other lines are there
    log4j.appender.PDE=com.semarchy.commons.log4j.appender.pde.PDEAppender
    log4j.appender.PDE.Threshold=INFO
    
    # Skipping some lines
    log4j.logger.com.semarchy.platform.data.core.datamgr.IDataManager=INFO
    


    # We update this line to say it's OK to log TRACE level messages in the PDE logger
    log4j.appender.PDE.Threshold=TRACE
    # We update any of the following next lines to send TRACE messages to the PDE logger
    # this one shows SQL executed from frontend + REST webservices call
    log4j.logger.org.springframework.jdbc.core.JdbcTemplate=TRACE, PDE
    # SQL executed from workbench and admin (legacy)
    log4j.logger.com.semarchy.commons.sql=TRACE, PDE
    # this one displays platform status change, platform READY is logged with INFO level, other statuses are logged with ERROR level
    log4j.logger.com.semarchy.mdm.datahub.services.query.datamgr.IDataManager=INFO, PDE


    # Sometimes the convenience of PDE in the GUI is nice. Sometimes it's far better to log to a file.
    # Log all queries to semarchy.log (by default the logger named TOMCAT configured above logs to semarchy.log)
    #log4j.appender.TOMCAT.Threshold=TRACE
    #log4j.logger.com.semarchy.commons.sql=TRACE,TOMCAT

    Log4j uses these logging levels (in order): 
    OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL

  2. Do something in the data navigator to generate a log. For example, open a Business View to explore at data.
  3. View the log:
    In the Semarchy xDM Workbench, choose the menu Window -> Show View... -> Error Log
    You'll see logs like this:

    Look inside to find the SQL.
  4. Don't forget to turn logging back off after you have resolved your issue(s).

Additional Details

com.semarchy.commons.log4j.appender.pde.PDEAppender is a Log4j Appender for our Error Log View allowing us to read logs from the web application.
We support all standard log4j appenders as well so we can log using several other ways.

Logging In JMS

Configuration to log in a JMS Topic defined in JNDI of the application server hosting convergence for MDM application (only topics are supported)

#replace standard appender with the one below in case of java.lang.ClassNotFoundException during log4j bootstrap
#com.semarchy.commons.log4j.appender.jms.JMSAppender
log4j.appender.jms=org.apache.log4j.net.JMSAppender
 
#JNDI name of topic and topic connection factory used to send logging
log4j.appender.jms.TopicBindingName=jms/logTopic
log4j.appender.jms.TopicConnectionFactoryBindingName=jms/ConnectionFactory

Available Loggers for Semarchy xDM

MDM apps loggers

Rest API loggers

Data Notifications loggers

Job loggers

Dashboard apps loggers

Workbench loggers

Platform loggers 

License Synchro loggers

Plugins loggers

Melissa plugin enrichers loggers


Cache Usage Logging


User access (from KB: Best Practice - configuring user access for a DEV instance)


Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.



Related issues