Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 17/Oct/2012 08:23:54
|
ivanhoe
Joined: 17/Aug/2012 07:25:43
Messages: 17
Offline
|
Hi,
I'm trying to enable the logging for ICEFaces & ICEPush to see if my PortableRenderer etc throw any errors, but it looks like I'm doing something wrong.
I added a commons-logging.properties in the docroot/WEB-INF/src Folder (same folder my JAVA Packages / Files are in) and a log4j.properties.
commons-logging.properties:
Code:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
log4j.properties:
Code:
log4j.rootLogger=FINEST
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=FINEST, stdout
log4j.logger.com.sun.faces.config.ConfigureListener=FINEST, stdout
log4j.logger.org.icepush=FINEST, stdout
log4j.logger.org.icepush.application.PushRenderer=FINEST, stdout
log4j.logger.org.icepush.application.PortableRenderer=FINEST, stdout
log4j.logger.org.icefaces=FINEST, stdout
I know finest is overkill, but I just wanted to get any logging output at all. Yet I don't get any, except the output of some liferay logging (those I don't need and their output hasn't change through the config at all, just fyi)
As you see I use the liferay Portal for my Portlets.
Help is appreciated :)
Quick edit: I tried the settings I found here: http://jforum.icesoft.org/JForum/posts/list/2453.page
But it didn't help at all :(
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 17/Oct/2012 10:35:49
|
deryk.sinotte

Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline
|
ICEfaces uses java.util logging. We ship an example file with our showcase-portlet demo that you should be able to use and modify to meet your needs. You can find it under:
./icefaces/samples/showcase/showcase-portlet/src/main/resources/logging.properties
|
Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc. |
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 18/Oct/2012 08:04:27
|
ivanhoe
Joined: 17/Aug/2012 07:25:43
Messages: 17
Offline
|
Thanks for the quick reply, it helped a little bit, but my problem isn't completely solved. In the example file you mentiod there's just:
Code:
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
.level = INFO
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.FileHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
I did set .level to "FINEST" which naturally spammed my console as soon as is restarted Tomcat. So I turned that off again.
Now I have the following config in the file:
Code:
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
.level = INFO
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.FileHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
com.icesoft.level = FINEST
org.icefaces.level = FINEST
org.icepush.level = FINEST
Those are the packages I saw earlier and I just wanted to get any output at all .... but still nothing.
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 18/Oct/2012 10:29:46
|
deryk.sinotte

Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline
|
If you are adding in the specific packages, then try removing the .info entry.
|
Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc. |
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 19/Oct/2012 05:59:46
|
ivanhoe
Joined: 17/Aug/2012 07:25:43
Messages: 17
Offline
|
Ah got it now. Had the file at the wrong location.
I had the file on D:\logging.properties and set Tomcat to start with that file, so Tomcat used the file for itself but ICEFaces and all other stuff didn't. After I coied the file in the root of my source directory it worked. Did that before but must have had another error back then 'cause at that time that didn't work either ... .
So all in all don't be stupid like me and just create a file in the source dir and everything's fine.
Thanks deryk anyway :).
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 05/Nov/2018 05:59:24
|
llevigne
Joined: 29/Oct/2018 03:43:59
Messages: 3
Offline
|
Good Day,
may we all understand that org.icepush, org.icefaces, com.icesoft components :
1/ up to 1.8.x where using Apache commons-logging "logging engine API" (commons-logging.properties to the src folder)
2/ and from 2.0.x they are re-coded to use java.util.logging "logging engine API" (-Djava.util.logging.config.file=\path\to\logging.properties)
??
if so, this would made world greater to write it simply
|
|
 |
|