Ir al contenido
Otras versiones

Cargando…

FileLogger

Esta página aún no está disponible en tu idioma.

Utility methods to generate a log. For example, to show error, info or warning. 

Description:

Method Return values Description
info(String baseName, String message, Object… params) void Static file logger with info.
  • baseName: The name of file to write.
  • message: A text with message for info.

Example:

package com.openkm;
import com.openkm.util.FileLogger;
public class Test {
public static void main(String[] args) {
try {
FileLogger.info("test.log", "This is info");
} catch (Exception e) {
e.printStackTrace();
}
}
}

Description:

Method Return values Description
warn(String baseName, String message, Object… params) void Static file logger with warn.
  • baseName: The name of file to write.
  • message: A text with message for warning.

Example:

package com.openkm;
import com.openkm.util.FileLogger;
public class Test {
public static void main(String[] args) {
try {
FileLogger.warn("test.log", "This is warning");
} catch (Exception e) {
e.printStackTrace();
}
}
}

Description:

Method Return values Description
error(String baseName, String message, Object… params) void Static file logger with error.
  • baseName: The name of file to write.
  • message: A text with message for error.

Example:

package com.openkm;
import com.openkm.util.FileLogger;
public class Test {
public static void main(String[] args) {
try {
FileLogger.error("test.log", "This is error");
} catch (Exception e) {
e.printStackTrace();
}
}
}