Using the J-Integra Logging Mechanism |
|
By default, J-Integra does not log any messages to a file. If this is desired for your application, we advise you to use the jintegra_reduced_logging.jar runtime file instead of jintegra.jar. Simply include jintegra_reduced_logging.jar in your Classpath instead of jintegra.jar. This will result in better overall performance. However, if you require some form of logging you will have to use the jintegra.jar runtime file.
Turning on J-Integra Logging
There are two methods you can use to turn on J-Integra logging:
Setting Java Properties During Runtime java -DJINTEGRA_LOG_FILE="c:\temp\jintegra.log" -DJINTEGRA_LOG_LEVEL=3
Setting Java Properties in Source CodePublic static void main(String args[]) {
System.setProperty("JINTEGRA_LOG_FILE", "c:\\temp\\jintegra.log");
System.setProperty("JINTEGRA_LOG_LEVEL", "3");
...
}
Public static void main(String args[]) {
com.linar.jintegra.Log.logImmediately(3, "c:\\temp\\jintegra.log");
...
}
Description of Logging Levels
There are four possible logging levels:
SILENT = 0 Does not create a log file
ERROR = 1 Only logs the errors
BRIEF = 2 Reports only significant events
VERBOSE = 3 Reports everything
Whenever sending logs to J-Integra Support, a logging level of VERBOSE should be used.