STAY IN TOUCH

and receive our newsletter to get the latest news and tips.


App Logger

A custom logger
function (App Logger) → context duration returns Number
[beta] How long the current context has been executing for in milliseconds.
function (App Logger) → context id returns String
[beta] The unique id of current context, or empty if in global scope.
function (App Logger) → context pause
[beta] Stop counting time in all current contexts
function (App Logger) → context resume
[beta] Start counting time again in all current contexts
function (App Logger) → context user returns String
[beta] Get the userid attached to the current context, or empty.
function (App Logger) → custom tick(id : String, meta : Json Object)
[beta] Log a custom event tick, including specified meta information, in any registered performance logger.
function (App Logger) → debug(message : String)
Logs a debug message
function (App Logger) → end
[beta] Ends a time sub-logger and reports the time.
function (App Logger) → error(message : String)
Logs an error message
function (App Logger) → info(message : String)
Logs an informational message
function (App Logger) → is invalid returns Boolean
Returns true if the current instance is useless
function (App Logger) → log(level : String, message : String, meta : Json Object)
Logs a new message with optional metadata. The level follows the syslog convention.
function (App Logger) → logger duration returns Number
[beta] How long the current logger has been executing for in milliseconds.
function (App Logger) → measure(id : String, value : Number)
[beta] Log a measure in any registered performance logger.
function (App Logger) → new context
[beta] Start new logging context when you're starting a new task (eg, handling a request)
function (App Logger) → set context user(userid : String)
[beta] Get the userid attached to the current context, or empty.
function (App Logger) → set verbosity(level : String)
[beta] Set minimum logging level for this logger (defaults to "debug").
function (App Logger) → start(task : String) returns App Logger
[beta] Starts a timed sub-logger. The task name is concatenated to the current logger category.
function (App Logger) → tick(id : String)
[beta] Log a custom event tick in any registered performance logger.
function (App Logger) → verbosity returns String
[beta] Get the current logging level for this logger (defaults to "debug").
function (App Logger) → warning(message : String)
Logs a warning message

edit this topic fiqjsdkhpy