Skip to content
/ tukki Public

Simple clojure first logging library with SLF4J compatibility

Notifications You must be signed in to change notification settings

jarppe/tukki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tukki - Simple clojure first logging library with SLF4J compatibility

Experimental library for handling logging in Clojure first way.

Most Clojure logging libraries are wrappers to an exiting Java libraries. I was wondering what a Clojure first solution would look like.

This library is Clojure logging library with SLF4J API for compatibility with existing Java libraries.

The major differences to existing solutions are:

  • Clojure friendly output out of the box
  • Write log output to System/out leaving REPL (that uses *out*) clean
  • The main logging API is done with macros that do not emit any code if the logging level is lower than configured level
  • About 7x faster than logback

Clojure friendly output

The default appender function (you can make your own, it's just a function) aims for developer happiness. It has following defaults:

  • Output is colored by log level, gray for debug, green for info, red for errors etc.
  • Namespaces are truncated so that foo.bar.boz becomes f.b.boz
  • Exceptions are printed with the root cause first
  • Only the root cause stack trace is printed completely
  • Stacktraces print clojure names as they are found in clojure files, so that function hello! is printed as hello!, instead if hello_BANG_

About

Simple clojure first logging library with SLF4J compatibility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published