joshrotenberg / brolog

JNA Access to syslog(3) in Clojure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

brolog

JNA Access to syslog(3) in Clojure

Rationale

I know. There are 50 ways to log stuff in Java-land. log4this and log4that. They all work pretty well. But I wanted old school, direct access to syslog because I'm a dinosaur, OK?

Usage

(ns your.ns
    (:use brolog.core))

(init-logging "myapp" log-local7)

;; after init, the interface looks like core.tools logging

(debug "some debugging message")
(info "something informational")

To log to a different syslog facility than the one you initialized brolog with:

(binding [brolog.logging/*logging-facility* log-local1]
  (info "this message is logged to the local7 facility"))

License

Copyright (C) 2012 Josh Rotenberg

Distributed under the Eclipse Public License, the same as Clojure.

About

JNA Access to syslog(3) in Clojure


Languages

Language:Clojure 100.0%