The log files are available in any version of InterFormNG. These log files are placed in {INTERFORMNG_HOME}/profiles/default/Logs, and can e.g. be displayed via the web interface.
The directory contains these files (and older versions with a timestamp):
service.log
service.info
service-web.log
- and a directory named processinglogs, which may contain log files from individual, processed files.
The log files contains all information about the processed input files and errors, that might have occurred.
The easiest way to view the log files is via the web interface, where you select Log and then Service or Web service
on the line below:
The Service tab lists all the log files generated by the document processor service, so if something went wrong while processing an input file, then you will be able to see the problem here. The service.log file is actual/active file, that the processor service is currently writing to. Other, older service log files also contains the date as a part of the file name. You can also open the service.info file which contains information of the version and general details of InterFormNG.
The web service tab lists the log files generated by the web server for InterFormNG. That is normally only interesting if you are unable to connect to the web server of InterFormNG. The actual web service log file is named service-web.log. Older log files also contains the date as a part of the file name.
There are 3 kinds of log files:
1. Info files.
These files contains the configuration and environment of the designer and the two services when they ran the last time.
2. Log files
The active log files are named designer.log, service.log and service-web.log. They contain the log of the current designer and service. Older log files includes the timestamp of when it was last used.
3. Processing log files
These log files are generated by the Document processing service and each log file contains only the log data concerning one input XML file. These files can be useful if you want to check out a problem if processing has failed for an input file.
Add extra information into the service.log
The contents of the log file for the service can e.g. be altered via the log4j-service.properties file inside {InterFormNG_HOME}\profiles\default:
If you change the line for log4j.appender.file.layout.ConversionPattern to this:
log4j.appender.file.layout.ConversionPattern=%d [%.50t][%X{id}] %-5p %c %m%n
Then it will show date, [thread-name], [MDC-id], severity, class, message, newline in the log file.
There are 4 defined MDC keywords: %X{<keyword>} in log4j conversion pattern.
- id: C_PERSIST_ID from the Job table. (Filesystem plugin: usually a copy of id. (filename))
- referenceId: C_JOB_REFERENCE. (Filesystem plugin: input filename)
- serviceLockIdentifier: C_JOB_ID
- internalId: simple counter. Increased when a new job is created.
For further MDC setup information please refer to this link:
http://logging.apache.org/log4j/2.0/manual/layouts.html
You can also set the time to keep the old log files, and how detailed you want the log files to be. Via the field, log4j.appender.file.MaxBackupIndex you can setup, how many old log files you want to keep. Below we have chose to keep 3 files:
# Log4j configuration for InterFormNG service
log4j.rootLogger=INFO, file, documentLog
log4j.logger.INFOFILE=INFO, InfoFileAppender
log4j.additivity.INFOFILE=false
log4j.appender.file=com.interform400.xml.common.log.DailyRollingFileAppender
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.MaxBackupIndex=3