4.10.4 Writing Log Messages in Custom Code
Use the java.util.logging.Logger class to write log messages in your custom implementations, e.g., Custom Security Provider.
Note: As of version 10.2, ReportLog.print() and SreeLog.print() should not be used to send messages to the server log.
Use the getLogger(String name) method to get an instance of the logger, for example,
private static final Logger logger = Logger.getLog(MyClass.class.getName());
To check if a certain level is loggable, use the inetsoft.util.LogUtil class, for example,
if(LogUtil.isLoggable(logger, Level.TRACE)) {
logger.log(Level.WARNING, "Task failed", excp);
}
else {
logger.log(Level.WARNING,"Task failed");
}
| << 4.10.3 Advanced Log Configuration | © 1996-2013 InetSoft Technology Corporation (v11.4) | 4.10.5 Implementing a Custom Log Handler >> |