Fork me on GitHub Fork me on GitHub

Log


<%
var log = new Log();
log.info("This is an INFO level log");
%>

Overview

The Log class will log errors, warning and information to the Jaggery console. It will mostly help when debugging your scripts.


Operations

Member   Type   Description
Log([logger])Log
var log = new Log("MYAPP");
Returns a Log object with "MYAPP" named logger if empty, log will take script name as the default logger
debug(String | Object)None
log.debug("this is a debug message")
prints a debug message to the console
info(String | Object)None
log.info("this is a info message")
prints a info message to the console
warn(String | Object)None
log.warn("this is a warn message")
prints a warn message to the console
error(String | Object)None
log.error("this is a error message")
prints a error message to the console
fatal(String | Object)None
log.fatal("this is a fatal message")
prints a fatal message to the console
isDebugEnabled()Boolean
log.isDebugEnabled()
Returns true if Debug level is enabled. Default is true
isTraceEnabled()Boolean
log.isTraceEnabled()
Returns true if Trace level is enabled. Default is false