cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Log debugging information to the FlexNet Operations log file

Log debugging information to the FlexNet Operations log file

Summary

Log debugging information to the FNO log file.

Synopsis

In custom Java classes, it may sometimes be useful to log critical debugging information to the FlexNet operations debug log file. This log file is called flexnet.log and is stored in the directory <ops_install_folder>\logs. Use the standard log4j library to implement logging, as detailed below


Discussion

To log debugging information to the flexnet.log file:

1. Add the following static variable declaration statement to the custom implementation class:

private static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("flexnet");

2. Use the log reference for adding the statements as needed, for example:

log.info("$$$$ TEST $$$$ - OpsEsnGenerator.generateEntitlementID() Raw ID value : " + esn);

3. Depending on your requirements, you can add log.error(), log.debug(), log.warn(), log.info() and log.error() statements. Based on the System Configuration Log Level, the statements will be written to flexnet.log.

4. Compile the class and test. For compilation, make sure to keep the log4j-1.2.11.jar in the classpath. This jar file is available in the FNO installation in the directory <install_dir>\site\webapps\flexnet\WEB-INF\lib.

No ratings
Version history
Last update:
‎May 24, 2011 07:45 AM
Updated by: