Setting logging level

95 views
Skip to first unread message

Sever

unread,
Nov 11, 2015, 12:53:38 PM11/11/15
to LittleProxy
Hello.

I'm stuck with rising logging level of LittleProxy to "debug".
In docs it is said:
> For examples of configuring logging, see src/test/resources/log4j.xml.
and also in discussions I've found:
> You just need log4j.xml in your classpath somewhere, so you can just copy it over to your own project.
but, sorry that I'm lame, I really could not get it - where should I place this configuration file,
if I'm using LittleProxy as already-compiled dependency for my project :(

I've already tried saving this file to the class path of my project (with editing the level ofcourse),
but it didn't worked.

Henrik

unread,
Dec 7, 2015, 8:13:50 AM12/7/15
to LittleProxy

Adding the log4j.xml in the jar or class path should work (did for me). I you use maven, put it in src/main/resources.
It might be you have it in src/test/resouces which isn't in the class path for normal execution (it's used for maven testing only).

If that doesn't work, try:
-Dlog4j.configuration=file:///your/path/log4j.xml
And if that doesn't work, check the console output for a message from log4j, I believe it tells you where it is looking for the config.
Reply all
Reply to author
Forward
0 new messages