depends a bit on your environment; doesn't it?
what is your application server i.e.
i.e. for a log4j enabled Tomcat it needs log4j.properties in the tomcat class 
directory (guess log4j.xml at the same place)
i.e. for a log4j enabled Axis2 service it needs the same in the 
axis2/WEB-INF/classes directory
and if you programmatically setup your log4j environment you can use one of 
this nice api calls to read a config file
and after all --- you have a debugger, don't you? 
To debug the startup yes in log4j.properties add debug=true to the first line
To set how it works at the code level, 
launch tomcat in debugging mode 
i.e. among other java switches have suspend=yes to have Tomcats JVM wait for a 
debugger to attach, 
so attach a debugger to the agreed debugging port of tomcats JVM and set breaks 
as you need it.
To debug best build your log4j kit, you would need this sources also in absence 
of documentation. 
Josef


-----Ursprüngliche Nachricht-----
Von: Yogi Nerella [mailto:[email protected]] 
Gesendet: Donnerstag, 14. Februar 2013 00:21
An: Log4J Users List
Betreff: How to debug startup of log4j

Hi,

How to debug log4j configuration startup issues?

Can I use "-Dlog4j.debug" = true?

How do I know where from "log4j.xml" is picked up?

Thanks,
Yogi

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to