Jake, Wow, what a great reply! I did not have log4j.properties in the root of the jar. Anyway, I tested all of your suggestions and they all worked!
Thanks again for your expertise and advice, Bob --- Jacob Kjome <[EMAIL PROTECTED]> wrote: > At 04:21 PM 1/9/2007, you wrote: > >I wrote a standalone Java application that uses > >commons logging (because of Axis) and log 4j. I am > >using a log4j.properties file. When I run the > program > >from within the development (Eclipse) environment, > the > >logging works fine. However, when I run the > program > >from the command line none of the log messages are > >logged. The log4j.propeties file is in the > >application's jar file in this case. > > Where in the application's jar file? In the root of > the jar? It > would have to be there for autoconfiguration to > work. > > >I have also tried > >putting log4j.properties in the folder that I > launch > >the program from. > > Is said directory in the classpath? That is, is > there either a > period or the fully qualified path to this directory > in the classpath? > > > There is still no logging done. > >Next, I tried putting log4j.properties in the lib > >folder and I added it to the the class path. > Still, no > >logging. > > > > Added the "lib" folder to the classpath or the file > itself? The > latter would be invalid, while the former would be > valid. > > >To recap, logging is working when I run the > program in > >the Eclipse environment, but not working when I > run > >the program from the command line. > > > >Is there some configuration that I am missing? > > > > If none of the above suggestions pan out, have you > made sure that > some other log4j.properties or log4j.xml (which > would get picked up > in preference to log4j.properties, even if it comes > later in the > classpath) isn't in the classpath? > > You can also try running with -Dlog4j.debug=true > > Jake > > >Thanks, > >Bob > > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
