Libraries probably shouldn't ship with a log4j configuration. The logging configuration should be left entirely to the application IMO.
On 26 November 2011 19:37, Ivan Koblik <ivankob...@gmail.com> wrote: > I'm pretty sure this is because of log4j.xml [1] in src directory of > Korma. I think it's take from here [2]. If you take a look at it, it sets > root debug level to "debug". > > Try creating your own configuration and pointing to it with command line > argument: > -Dlog4j.configuration=your_log4j.xml > > What are the usual rule for the libraries? Is it OK to create log4j.xml in > default location? If not how should it be done? > > [1] https://github.com/ibdknox/Korma/blob/master/src/log4j.xml > [2] http://wiki.apache.org/logging-log4j/Log4jXmlFormat > > Cheers, > Ivan. > > > > On 25 November 2011 16:43, Dennis Crenshaw <crensha...@gmail.com> wrote: > >> So I'm trying to create a drop-in implementation of a SOAP webservice >> with Clojure. Naturally I look into libraries that accomplish the different >> bits. I need something to do SQL work with a relational db >> (Korma<https://github.com/ibdknox/korma>, >> check!) and I need to present a SOAP interface >> (clj-soap<https://bitbucket.org/taka2ru/clj-soap>, >> check!) >> >> Unfortunately I'm having tooling issues putting the two together. >> >> The first problem, I'm pretty sure, was simply a Clojure version >> mismatch: I and Korma were using Clojure 1.3 and alj-soap was using 1.2-- >> so I checked out the clj-soap source and updated the libraries (Clojure to >> 1.3, the Axis2 libraries to their latest) and ran the tests to make sure >> all was still working-- it was. So I pushed the 'new' clj-soap to clojars >> as [org.clojars.crenshawda/clj-soap "0.1.2"] and tried again. >> >> Much to my chagrin I started getting seemingly endless byzantine DEBUG >> log traces spewed out into the repl when I try to start the soap server. >> >> If I comment Korma out of the project.clj, lein deps, and lein repl the >> same thing works like a charm. I also checked out each of Korma's >> dependencies individually and ran the same serve function and it worked >> (the log4j dep made it complin, but it still served just fine.) >> >> I'm not exactly sure WHAT is causing the collision between Korma and >> clj-soap, but it's damaging my calm at this point. :) I have a gut feeling >> that it's somehow logging related, but I don't know why it would cause >> clj-soap to flip out so badly. >> >> To recreate my scenario, start a new project and add these dependencies >> to the project.clj: >> >> [org.clojure/clojure "1.3.0"] ;; if is isn't already there by default, I >> want to use 1.3 >> [korma "0.3.0-apha4"] >> [org.clojars.crenshawda/clj-soap "0.1.2"] ;; use [clj-soap "0.1.1"] if >> you want to see what I was talking about with the 1.2/1.3 mismatch >> >> Since Axis2 (what clj-soap is build upon) requires compiled classes to >> serve soap, you'll probably have to define a service in a clj file so 'lein >> repl' will pre-compile it for convenience sake. >> >> You can use this: >> >> (soap/defservice service.Hello >> (hello ^String [^String s] >> (str "Hello Yourself"))) >> >> So when you start your repl you should have classes/services/Hello.class >> in your classes/ directory. After you have to invoke clj-soap's serve >> function: >> >> (serve "service.Hello") >> >> ... aaaand you should have a lovely logging wreck in your repl. I'd be >> happier if I could at least figure out WHY it happens when I put Korma in >> my dependencies. Sorry for the wall of text, but I figure too much info is >> usually better than not enough. :) >> >> -- >> 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 >> Note that posts from new members are moderated - please be patient with >> your first post. >> 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 > > > -- > 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 > Note that posts from new members are moderated - please be patient with > your first post. > 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 > -- 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 Note that posts from new members are moderated - please be patient with your first post. 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