开发者

Managing log4j.properties with lein

I'm trying to figure out how I can manage my l开发者_如何学编程og4j.properties file with leiningen. I'd like to be able to automatically include the file in the jars that lein creates as well as have the properties file be accessible to "lein swank" (and lein repl).

Right now I have the file in my project "root", but I get this error when I using logging from swank

[null] log4j:WARN No appenders could be found for logger (com.dev).
[null] log4j:WARN Please initialize the log4j system properly.

Thanks!

NOTE: I got my log4j.properties file from the blog post at http://www.paullegato.com/blog/log4j-clojure/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+clojure+(Planet+Clojure0 I'd be content (actually thrilled) configuring my logging output format from within Clojure, but I haven't found a way to do it yet.


You should put the log4j.properties file in the resources(top level folder - where project.clj, src, test, lib, classes are) folder of your lein project. That way it will be made available on the classpath and packaged with the project if you run lein jar.


Just to keep this current...

You should look at clj-logging-config. It allows you to configure your logger from Clojure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜