- clj-kondo config to warn when using an add number of arguments
lambdaisland.glogi.console/timestamp
goog-define, set to"true"
to prepend each log message with a timestamp
- Modified an internal function so that code emitted by logging macros can be DCE'd when the user disables logging.
- Add support for logging multiple forms with
spy
.
- Release under
com.lambdaisland
as well aslambdaisland
, see lambdaisland/open-source#9
- Version bumps
- Fix Closure compatibility issue
- Set a default level of
:info
for the root logger
- Fix macro resolve in
ns
, which caused cljs logs to fail
- Fixed an issue with advanced compilation when calling
level-value
, which is used by the console handler
- Artifact name changed to
com.lambdaisland/glogi
in line with Clojars policy
- Prevent single-arg
logger
from erasing the log level
- More fixes to deal with upstream changes in Google Closure Library
- With
lambdaisland.glogc
there is now an official way to use the Glogi/Pedestal-log combo in a consistent cross-platform way
- Maintain compatibility with newer versions of the Google Closure library, which introduced breaking changes in v20210302
- Export lambdaisland.glogi.set-levels so you can use it from the browser console (pass in an array of two-element arrays of strings)
- We no longer pull in a specific Clojure/ClojureScript version, assuming that client consumers will already have specific versions declared for their project.
- the Closure constant
lambdaisland.glogi.console.colorize
can now take four possible values,"true"
(useconsole.log
CSS formatting),"false"
(log plain text),"raw"
, log objects directly (good for cljs-devtools), or"auto"
(detect most suitable option)
- For for when goog.log.ENABLED is false (for use in prod builds)
- Fix incorrect variable reference in
logger
- Honor goog.log.ENABLED, important for release builds
- Print support for cljs.core.PersistentQueue
- Added colored printing of objects and arrays
- Fixed colored printing of seqs and vectors
- Better mapping of log levels to log methods and colors.
:trace
is now an alias for:finer
,:debug
for:fine
(before:trace
=:fine
,:debug
=:config
)
- Added colorization of Clojure data structures, for places where devtools is not available
- Added the
config
macro, which logs to the corresponding log level
- Added
spy
macro, logs the expression and its return value, returns the value - Added logging macros corresponding with goog.log log levels:
shout
,severe
,fine
,finer
,finest
- Use the correct console log method (log, error, warn, info) based on the log level
- Added the ability to use keywords or symbols to look up a logger, or the
special
:glogi/root
to find the root logger.
- Fixed
set-levels
to match its docstring. Takes a map.
- Got rid of the
LogBuffer/CAPACITY
hack, to prevent issues with advanced compilation
- Added
set-level
for convenience
- Fix assertion in
set-level
- Fix glogi.console when devtools isn't available
lambdaisland.glogi.console
provides an alternative togoog.debug.Console
, with the main benefit that it will log full data structures, thus playing nicely with cljs-devtools- Added an
info
macro for compat with pedestal.
- The default formatter is now
identity
instead ofpr-str
. This way we preserve full data structures until the last minute. Note that goog.debug.Logger will stringify the message, unless care is taken for it not to.
First release