Logging Settings

Log settings are configured in file logback.xml that is located in ${TIF_ROOT}/etc.

The file can be modified to configure where TIF log messages will be written. Also, you can configure log level for each package.

Logging from Custom Classes

Use classes org.slf4j.Logger and org.slf4j.LoggerFactory when logging and add your Java package name along with a suitable log level to logback.xml.

For example:

package com.acme;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class YourClass {

    private static final Logger logger = LoggerFactory.getLogger(YourClass.class);

    public void yourMethod() {
        // The following will construct a debug message 'This is your debug message'.
        String yourParam = "your debug message";
        logger.debug("This is {}", yourParam);
    }

}

Add a logger with the package name to logback.xml:

<configuration>
    ...

    <logger name="com.acme" level="DEBUG"/>

    ...
</configuration>