You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Description

  • org.joget.commons.util.LogUtil
  • Under wflow-commons module
  • Utility methods to log message to log file

Code Sample

import java.lang.Exception;
import org.joget.commons.util.LogUtil;
 
try {
    //do something
} catch (Exception e) {
    LogUtil.error("org.sample.SamplePlugin", e, "Error!!");
}

Methods

debug
public static void debug(java.lang.String className, java.lang.String message)

Log message with logger level is debug

error
public static void error(java.lang.String className, java.lang.Throwable e, java.lang.String message)

Log exception message with logger level is error

getTomcatLogFile
public static java.io.File getTomcatLogFile(java.lang.String filename)

Convenient method to retrieve all tomcat log file by file name 

info
public static void info(java.lang.String className, java.lang.String message)

Log message with logger level is info

isDeployInTomcat
public static java.lang.Boolean isDeployInTomcat()

Check is the current installation is deploy in Tomcat server

tomcatLogFiles
public static java.io.File[] tomcatLogFiles()

Convenient method to retrieve all tomcat log files 

warn
public static void warn(java.lang.String className, java.lang.String message)

Log message with logger level is warn

  • No labels