Servicely Administration
Scripting
Logger API
7 min
logging business api summary the logger functionality provides the ability to log application messages, the logger can be configured to log only messages if the desired logging level are set there are 5 levels of logging in servicely error warning info debug trace logging level the logging level can be set as part of the code where logging is been used basic configuration let mylogger = logger(“workflowlog”); by default these debug levels are set error (enabled) warning (enabled) info (enabled) advanced configuration let mylogger = logger(“workflowlog”); the log level can be set inside the script (java script code) with loglevel(“warn”) to have the ability to change log levels on demand or for a specific instance it can be configured in the servicely backend by navigating to administration => logging & statistics => system log level field description source name of the logger level debug level error warning info debug trace constructor method description creates a logger with the specified name methods method description returns the current log level as a string sets the logging level of the logger used as a check to see if the error logging level has been enabled used as a check to see if the warning logging level has been enabled used as a check to see if the info logging level has been enabled used as a check to see if the debug logging level has been enabled used as a check to see if the trace logging level has been enabled used to log an error used to log a warning used to log an info message used to log a debug message used to log a trace message