(add-handler handler-fn)
(add-handler name handler-fn)
Add a log handler to the given logger, or to the root logger if no logger is specified. The handler is a function which receives a map as its argument.
Add a log handler to the given logger, or to the root logger if no logger is specified. The handler is a function which receives a map as its argument.
(console-autoinstall!)
Log to the browser console if the browser location contains Debug=true.
Log to the browser console if the browser location contains Debug=true.
(enable-console-logging!)
Log to the browser console. This uses goog.debug.Console directly, use [lambdaisland.glogi.console/install!] for a version that plays nicely with cljs-devtools.
Log to the browser console. This uses goog.debug.Console directly, use [lambdaisland.glogi.console/install!] for a version that plays nicely with cljs-devtools.
(level-value lvl)
Get the numeric value of a log level (keyword).
Get the numeric value of a log level (keyword).
(log name lvl message)
(log name lvl message exception)
Output a log message to the given logger, optionally with an exception to be logged.
Output a log message to the given logger, optionally with an exception to be logged.
(log-to-div! element)
Log messages to an element on the page. Returns the DivConsole instance.
Log messages to an element on the page. Returns the DivConsole instance.
(logger n)
(logger n level)
Get a logger by name, and optionally set its level. Name can be a string keyword, or symbol. The special keyword :glogi/root returns the root logger.
Get a logger by name, and optionally set its level. Name can be a string keyword, or symbol. The special keyword :glogi/root returns the root logger.
(popup-logger-window!)
Pop up a browser window which will display log messages. Returns the FancyWindow instance.
Pop up a browser window which will display log messages. Returns the FancyWindow instance.
(set-level name lvl)
Set the level (a keyword) of the given logger, identified by name.
Set the level (a keyword) of the given logger, identified by name.
(set-levels lvls)
Convenience function for setting several levels at one.
Takes a map of logger name => level keyword. The logger name can be a string, keyword, or symbol. The keyword :glogi/root refers to the root logger and is equivalent to using an empty string.
This function is exported so it is still available in optimized builds to set levels from the javascript console. In this case use nested arrays and strings. Use an empty string for the root logger.
lambdaisland.glogi.set_levels([["" "debug"] ["lambdaisland" "trace"]])
Convenience function for setting several levels at one. Takes a map of logger name => level keyword. The logger name can be a string, keyword, or symbol. The keyword :glogi/root refers to the root logger and is equivalent to using an empty string. This function is exported so it is still available in optimized builds to set levels from the javascript console. In this case use nested arrays and strings. Use an empty string for the root logger. ``` javascript lambdaisland.glogi.set_levels([["" "debug"] ["lambdaisland" "trace"]]) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close