voyent
icefaces + eclipse + log4j  XML
Forum Index -> General Help
Author Message
luposolitario1967

Joined: 04/Oct/2006 00:00:00
Messages: 48
Offline


J'm deploing a project whit eclipse and icefaces but j can't
debug my java souce code with log4j ... all the trace is not
show on eclipse console and neither on tomcat log

it's very difficult find error when i can't see where is it

i've just deploy same project with eclipse and log4j and all works good but when j introduce icefaces the log/trace disappear

can someone help me?
thank in advance

bye
Marco
[Email]
fabmars

Joined: 24/Aug/2006 00:00:00
Messages: 73
Offline


That's normal, iceFaces uses Apache commons-logging api and until you've piped it to a decent logging engine, like log4J, nothing will show up.

At the root of your src dir, create a file called "commons-logging.properties" that contains :
org.apache.commons.logging.Log org.apache.commons.logging.impl.Log4JLogger

Same folder, create a file called log4J.properties that contains for example :
log4j.rootLogger=INFO

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d{dd MMM yyyy HH:mm:ss}] %-5p [%F:%L -- %M] - %m%n

log4j.logger.com.icesoft.faces.application.D2DViewHandler=WARN, stdout
log4j.logger.com.sun.faces.config.ConfigureListener=WARN, stdout

That will enable you to see all WARN's coming out of jsf core and icefaces into Eclipse's console.
Hope it helps.

http://www.suntriprecords.com
luposolitario1967

Joined: 04/Oct/2006 00:00:00
Messages: 48
Offline


thank it work
bye
[Email]
ehiralph

Joined: 13/Jun/2008 00:00:00
Messages: 1
Offline


Thanks a lot this worked for me.
netdaviso

Joined: 05/Oct/2007 00:00:00
Messages: 85
Offline


Hi, fabmars.

What exactly means At the root of your src dir??

I have several packages like;

org.app.utils
org.app.resources
org.app.mybeans
org.app.components

.......

Where exactly do I need to create commons-logging.properties

I'm using rigth now 1.8.2 icefaces libs.

Thanks
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team