Thanks Luc Prefontaine wrote: > We use apache common logging and log4j to do all our logging from both > Clojure and java components. > You can use the SyslogAppender iof log4j to log to syslog. > > To get log4j configured we use Spring but you could use the > -Dlog4j.configuration=<file> when starting Clojure to load a log4j > configuration. > That would be simple an effective. > > To log from your code: > > (import '(org.apache.commons.logging LogFactory Log)) > > (defn get-logger [] > (LogFactory/getLog (str *ns*) ) > ) > > To get a logger specific to your current name space just call > (get-logger). You can do a (def log (get-logger)) at the top > of your files or you can call it dynamically each time you need it. > > (bean (. log getLogger)) > > will show you the details of your logger. > > Luc > >
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---