Skip to content

Instantly share code, notes, and snippets.

@maoe
Created March 25, 2010 14:25
Show Gist options
  • Save maoe/343605 to your computer and use it in GitHub Desktop.
Save maoe/343605 to your computer and use it in GitHub Desktop.
clojure.contrib.loggingの使い方
user=> (use 'clojure.contrib.logging)
nil
user=> (info "foo-info")
2010/03/25 23:21:23 clojure.contrib.logging$eval__92$impl_write_BANG___100 invoke
情報: foo-info
nil
user=> (fatal "foo-fatal")
2010/03/25 23:21:32 clojure.contrib.logging$eval__92$impl_write_BANG___100 invoke
致命的: foo-fatal
nil
user=> (use 'clojure.contrib.duck-streams)
nil
user=> (with-out-append-writer "/tmp/test.log"
(info "bar-info")
(fatal "bar-fatal"))
2010/03/25 23:22:06 clojure.contrib.logging$eval__92$impl_write_BANG___100 invoke
情報: bar-info
2010/03/25 23:22:06 clojure.contrib.logging$eval__92$impl_write_BANG___100 invoke
致命的: bar-fatal
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment