Liking cljdoc? Tell your friends :D

Huon Build Status

A logging library for ClojureScript that wraps goog.debug.Logger.

Goals

  • Leverage GClosure functionality
  • Lazy message evaluation
  • Simple API

Non-goals

  • Highly configurable

Installation

Add [org.harto/huon "0.5.1"] as a dependency in project.clj.

Usage

(ns foo.bar
  (:require [huon.log :as log]))

;; required; once per app
(log/enable!)

;; optional; defaults to :warn
(log/set-root-level! :info)

(log/debug "an invisible message")
(log/info "hello" "world")

Output:

 [  0.021s] [foo.bar:11] [INFO] hello world

Available macros are debug, info, warn and error.

Development

The automated test suite is runnable via bin/run-tests.

License

MIT; see LICENSE.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close