arthur_info
asked on
How to filter the Apache messages in the console panel of Eclipse?
I want to show only errors and Warnings... Is there any way of to do this?
Thanks...
Thanks...
Probably you need this?!
https://www.experts-exchange.com/questions/24828345/How-to-change-eclipse-log-level.html
https://www.experts-exchange.com/questions/24828345/How-to-change-eclipse-log-level.html
ASKER
Well, I saw all the comments, but:
1. The link http://snippets.dzone.com/posts/show/3248 it's about a procedure very complex that, if I understood well, creates a file with a log.
2. The https://www.experts-exchange.com/questions/24828345/How-to-change-eclipse-log-level.html it's interesting, but what I really want it's to show in the console Window only what I want, not in the Error window. I'd attached a printscreen.
Thanks a lot!
Sem-t-tulo.jpg
1. The link http://snippets.dzone.com/posts/show/3248 it's about a procedure very complex that, if I understood well, creates a file with a log.
2. The https://www.experts-exchange.com/questions/24828345/How-to-change-eclipse-log-level.html it's interesting, but what I really want it's to show in the console Window only what I want, not in the Error window. I'd attached a printscreen.
Thanks a lot!
Sem-t-tulo.jpg
As I can see your INFO messages are from Spring. Add this tag
<logger name="org.springframework" >
<level value="info"/>
</logger>
to your log4j.properties file.
<logger name="org.springframework"
<level value="info"/>
</logger>
to your log4j.properties file.
with value="warn" :-)
Sorry it's in log4j.xml
Hope it will help you:
http://th1rty7.blogspot.com/2009/03/configure-logging-in-spring-with-log4j.html
Hope it will help you:
http://th1rty7.blogspot.com/2009/03/configure-logging-in-spring-with-log4j.html
ASKER
Well, I tried to follow the steps but two errors occurs in the console. I'm sending the log attached.
Error:
INFO: Initializing Log4J from [Y:\Desenvolvimento\Workfo lder\.meta data\.plug ins\org.ec lipse.wst. server.cor e\tmp0\wtp webapps\si ge-rh\WEB- INF\log4j. xml]
17/08/2010 14:02:35 org.apache.catalina.core.S tandardCon text listenerStart
GRAVE: Exception sending context initialized event to listener instance of class org.springframework.web.ut il.Log4jCo nfigListen er
java.lang.NoClassDefFoundE rror: org/apache/log4j/xml/DOMCo nfigurator
at org.springframework.util.L og4jConfig urer.initL ogging(Log 4jConfigur er.java:67 )
at org.springframework.web.ut il.Log4jWe bConfigure r.initLogg ing(Log4jW ebConfigur er.java:15 1)
at org.springframework.web.ut il.Log4jCo nfigListen er.context Initialize d(Log4jCon figListene r.java:47)
at org.apache.catalina.core.S tandardCon text.liste nerStart(S tandardCon text.java: 3934)
at org.apache.catalina.core.S tandardCon text.start (StandardC ontext.jav a:4429)
at org.apache.catalina.core.C ontainerBa se.start(C ontainerBa se.java:10 45)
at org.apache.catalina.core.S tandardHos t.start(St andardHost .java:722)
at org.apache.catalina.core.C ontainerBa se.start(C ontainerBa se.java:10 45)
at org.apache.catalina.core.S tandardEng ine.start( StandardEn gine.java: 443)
at org.apache.catalina.core.S tandardSer vice.start (StandardS ervice.jav a:516)
at org.apache.catalina.core.S tandardSer ver.start( StandardSe rver.java: 710)
at org.apache.catalina.startu p.Catalina .start(Cat alina.java :583)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Un known Source)
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Unknown Source)
at java.lang.reflect.Method.i nvoke(Unkn own Source)
at org.apache.catalina.startu p.Bootstra p.start(Bo otstrap.ja va:288)
at org.apache.catalina.startu p.Bootstra p.main(Boo tstrap.jav a:413)
Caused by: java.lang.ClassNotFoundExc eption: org.apache.log4j.xml.DOMCo nfigurator
at org.apache.catalina.loader .WebappCla ssLoader.l oadClass(W ebappClass Loader.jav a:1387)
at org.apache.catalina.loader .WebappCla ssLoader.l oadClass(W ebappClass Loader.jav a:1233)
... 18 more
17/08/2010 14:02:35 org.apache.catalina.core.A pplication Context log
log.txt
Error:
INFO: Initializing Log4J from [Y:\Desenvolvimento\Workfo
17/08/2010 14:02:35 org.apache.catalina.core.S
GRAVE: Exception sending context initialized event to listener instance of class org.springframework.web.ut
java.lang.NoClassDefFoundE
at org.springframework.util.L
at org.springframework.web.ut
at org.springframework.web.ut
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.C
at org.apache.catalina.core.S
at org.apache.catalina.core.C
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.startu
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.catalina.startu
at org.apache.catalina.startu
Caused by: java.lang.ClassNotFoundExc
at org.apache.catalina.loader
at org.apache.catalina.loader
... 18 more
17/08/2010 14:02:35 org.apache.catalina.core.A
log.txt
ASKER
My log4j.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n"/>
</layout>
</appender>
<root>
<priority value ="error" />
<appender-ref ref="console" />
</root>
<category name="org.springframework" additivity="false">
<priority value="debug" />
<appender-ref ref="console" />
</category>
<logger name="org.springframework">
<level value="warn"></level>
<level value="error"></level>
<level value="fatal"></level>
<level value="debug"></level>
<level value="trace"></level>
</logger>
</log4j:configuration>
ASKER
I forget of to copy the library to lib folder. When I put in the lib folder, the following error appears:
log4j:ERROR Attempted to append to closed appender named [console].
Some idea?
Thanks!
log4j:ERROR Attempted to append to closed appender named [console].
Some idea?
Thanks!
Very strange?!
Since you have category tag you have to remove logger tag.
Probably console is used by other logger I changed it to cns.
try with this file :
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="cns" class="org.apache.log4j.Co nsoleAppen der">
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.Pa tternLayou t">
<param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n"/>
</layout>
</appender>
<root>
<priority value ="error" />
<appender-ref ref="cns" />
</root>
<category name="org.springframework" additivity="false">
<priority value="warn" />
<appender-ref ref="cns" />
</category>
</log4j:configuration>
Since you have category tag you have to remove logger tag.
Probably console is used by other logger I changed it to cns.
try with this file :
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="cns" class="org.apache.log4j.Co
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.Pa
<param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n"/>
</layout>
</appender>
<root>
<priority value ="error" />
<appender-ref ref="cns" />
</root>
<category name="org.springframework"
<priority value="warn" />
<appender-ref ref="cns" />
</category>
</log4j:configuration>
ASKER
Well, now we have two new messages:
log4j:WARN Continuable parsing error 23 and column 23
log4j:WARN The content of element type "log4j:configuration" must match "(renderer*,throwableRende rer?,appen der*,plugi n*,(catego ry|logger) *,root?,(c ategoryFac tory|logge rFactory)? )".
The console is attached.
Thanks...
log.txt
log4j:WARN Continuable parsing error 23 and column 23
log4j:WARN The content of element type "log4j:configuration" must match "(renderer*,throwableRende
The console is attached.
Thanks...
log.txt
Do you have commons-logging.jar in your Tomcat/lib folder? If you have remove it from there...
ASKER
Hum, yes. I removed and some errors appeared... I' sending the console log attached.
log.txt
log.txt
...and add it to your web application lib folder in order to read properties from your log4j.xml file instead of log4j.properties file placed in your tomcat/lib folder...
ASKER
Well, I do what you tell me, but the error persists. So, I was searching in the web for another solution and founded an interesting configuration that, if I change my log4j.xml, more information go to the console. The problem is that I want only this messages and only if are messages of errors or warnings. I attached the files...
log4j.txt
log4j.txt
ASKER
The console file:
Console.txt
Console.txt
ok, that's good! Now in order to supress the messages you dont need, you have to add such categories:
for example, to supress messages from tomcat you have to add :
<category name="org.apache.tomcat" additivity="false">
<priority value="error" />
<appender-ref ref="CONSOLE" />
</category>
in order to stop messages from hibernate you have to add :
<category name="org.hibernate" additivity="false">
<priority value="error" />
<appender-ref ref="CONSOLE" />
</category>
In this way you can define different categories and different log levels for each one of them.
Also you can define different appender for System .err.
So, add this categories to your log4j.xml and try again.
for example, to supress messages from tomcat you have to add :
<category name="org.apache.tomcat" additivity="false">
<priority value="error" />
<appender-ref ref="CONSOLE" />
</category>
in order to stop messages from hibernate you have to add :
<category name="org.hibernate" additivity="false">
<priority value="error" />
<appender-ref ref="CONSOLE" />
</category>
In this way you can define different categories and different log levels for each one of them.
Also you can define different appender for System .err.
So, add this categories to your log4j.xml and try again.
Here is an article I found for you :
http://boncey.org/2006_7_25_log4j_with_xml_configuration
http://boncey.org/2006_7_25_log4j_with_xml_configuration
ASKER
Hum... There's something missing... I'm still with the console with a lot of INFO messages (in red) and some messages of log (in black). I'm not understanding one thing: the log4j.configuration is essential? Because I removed it thinking that the log4.xml it's sufficient to make the filter of log messages. In your article, there's a part that says:
"You can also choose to set the system property log4j.configuration before starting Tomcat. For Tomcat 3.x The TOMCAT_OPTS environment variable is used to set command line options. For Tomcat 4.0, set the CATALINA_OPTS environment variable instead of TOMCAT_OPTS."
How can I do that? I'm confuse, sorry.
log4j.txt
Console.txt
"You can also choose to set the system property log4j.configuration before starting Tomcat. For Tomcat 3.x The TOMCAT_OPTS environment variable is used to set command line options. For Tomcat 4.0, set the CATALINA_OPTS environment variable instead of TOMCAT_OPTS."
How can I do that? I'm confuse, sorry.
log4j.txt
Console.txt
Log4j first is looking for log4j.xml, after that if there is no log4j.xml it is looking for log4j.properties file in order to configure itself. Yes, there is something missing?!?!?!
Which version of Tomcat you are using?
Which version of Tomcat you are using?
Probably your Log4J is not configured from your log4j.xml file?!
Take a look in your $CATALINA_HOME/lib folder. If there is log4j.properties file move it from there...
Take a look in your $CATALINA_HOME/lib folder. If there is log4j.properties file move it from there...
ASKER
I'm using tomcat 6.0.20 and the log4j.properties doesn't exists in any apache folder. So, the problem is not this, I think.
wow :-( I was thinking that it's Tomcat 5.x
I saw that there are some issues with Tomcat 6 and xml based configuration files.
http://tomcat.apache.org/tomcat-6.0-doc/logging.html#log4j
You have to use properties file. It's the same like xml configuration. I'll try to find some log4j.properties example that user ConsoleAppender.
Sorry once again that I didn't asked you for your Tomcat version earlier! Also I didn't know about this issues with Tomcat 6.
I saw that there are some issues with Tomcat 6 and xml based configuration files.
http://tomcat.apache.org/tomcat-6.0-doc/logging.html#log4j
You have to use properties file. It's the same like xml configuration. I'll try to find some log4j.properties example that user ConsoleAppender.
Sorry once again that I didn't asked you for your Tomcat version earlier! Also I didn't know about this issues with Tomcat 6.
ASKER
No problem. I was seeing this link but doesn't works. I created the file properties, I put in the conf folder, I put the log4j-1.2.16.jar in the lib folder, I didn't download any additional component, I didn't found the file output/extras/tomcat-juli. jar... Well, I'm lost... Do you know how to do this in a easy way?
Thanks a lot for your patience...
Thanks a lot for your patience...
First of all I'd like to rollback last changes, so your Tomcat to be in the initial state, like the way before the question. Delete log4j.xml file and move commons-logging.jar back to $CATALINA_HOME/lib folder.
Also move log4j jar back to $CATALINA_HOME/lib folder.
Place the attached file in $CATALINA_HOME/lib, but before to place it rename it to "log4j.properties".
Now you can follow all of the steps from this link :
http://tomcat.apache.org/tomcat-6.0-doc/logging.html#log4j
Extras components you can download from here:
http://apache.xenvps.us/tomcat/tomcat-6/v6.0.29/bin/extras/
log4j.txt
Also move log4j jar back to $CATALINA_HOME/lib folder.
Place the attached file in $CATALINA_HOME/lib, but before to place it rename it to "log4j.properties".
Now you can follow all of the steps from this link :
http://tomcat.apache.org/tomcat-6.0-doc/logging.html#log4j
Extras components you can download from here:
http://apache.xenvps.us/tomcat/tomcat-6/v6.0.29/bin/extras/
log4j.txt
ASKER
Hey!!! We're almost there!!!!!
The log now it's attached. The problem now it's that it's appearing only warn messages (I need the errors messages too) and some INFO messages from JSF it's appearing too, I need to filter this. How to fix that? Another problem I think it's that the logging.properties when I remove from the $CATALINA_HOME/conf folder the user doesn't log in my application. I think that I can't remove it... And now? What we can do?
The log now it's attached. The problem now it's that it's appearing only warn messages (I need the errors messages too) and some INFO messages from JSF it's appearing too, I need to filter this. How to fix that? Another problem I think it's that the logging.properties when I remove from the $CATALINA_HOME/conf folder the user doesn't log in my application. I think that I can't remove it... And now? What we can do?
0 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:vale-transporte' did not find a matching property.
3 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context/Realm} Setting property 'debug' to '99' did not find a matching property.
4 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:sige-lotacao' did not find a matching property.
4 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:sige-rh' did not find a matching property.
4 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context/Realm} Setting property 'debug' to '99' did not find a matching property.
5 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Concurso' did not find a matching property.
5 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context/Realm} Setting property 'debug' to '99' did not find a matching property.
20/08/2010 09:31:05 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_05-b06-FCS) for context '/Concurso'
20/08/2010 09:31:18 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_05-b06-FCS) for context '/sige-rh'
20/08/2010 09:31:19 com.sun.faces.config.processor.NavigationConfigProcessor addNavigationCasesForRule
AVISO: JSF1058: The resource referred to by to-view-id, 'cadastro/funcionario.jsp', for navigation from '*', does not start with '/'. This will be added for you, but it should be corrected.
20/08/2010 09:31:19 com.sun.faces.config.processor.NavigationConfigProcessor addNavigationCasesForRule
AVISO: JSF1058: The resource referred to by to-view-id, 'cadastro/carencia.jsp', for navigation from '*', does not start with '/'. This will be added for you, but it should be corrected.
20/08/2010 09:31:20 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_05-b06-FCS) for context '/vale-transporte'
20/08/2010 09:31:22 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_05-b06-FCS) for context '/sige-lotacao'
ASKER
Hey, forget about what I said about logging.properties. There's no problem when I remove it. :)
>> The problem now it's that it's appearing only warn messages (I need the errors messages too)
You don't have error msgs, that's way there are no errors in your log. In this log4j.properties file you have defined WARN log level, it means that only WARN, ERROR & FATAL will be displayed.
>> and some INFO messages from JSF it's appearing too
In order to stop these messages(from JSF) you have to open your log4j.properties file and to add this line at the end :
log4j.logger.com.sun.faces =WARN
it will stop all messages from package "com.sun.faces" with log level < WARN.
In this way you can configure whatever you want for your packages. You can set WARN for some of them, DEBUG for some others...
You don't have error msgs, that's way there are no errors in your log. In this log4j.properties file you have defined WARN log level, it means that only WARN, ERROR & FATAL will be displayed.
>> and some INFO messages from JSF it's appearing too
In order to stop these messages(from JSF) you have to open your log4j.properties file and to add this line at the end :
log4j.logger.com.sun.faces
it will stop all messages from package "com.sun.faces" with log level < WARN.
In this way you can configure whatever you want for your packages. You can set WARN for some of them, DEBUG for some others...
ASKER
Hum... Ok...
Well, I'd changed the log4j.properties but the Info messages keep appearing... I'd stopped and start again apache but nothing... Weird... What can be?
Well, I'd changed the log4j.properties but the Info messages keep appearing... I'd stopped and start again apache but nothing... Weird... What can be?
# ***** Set root logger level to WARN and its only appender to A.
log4j.rootLogger=WARN, A
# ***** A is set to be a ConsoleAppender.
log4j.appender.A=org.apache.log4j.ConsoleAppender
# ***** A uses PatternLayout.
log4j.appender.A.layout=org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
log4j.logger.org.apache.catalina=WARN
log4j.logger.org.hibernate.cfg=WARN
log4j.logger.com.sun.faces=WARN
Add also this line to your log4j properties file :
log4j.logger.com.sun.faces .config.Co nfigureLis tener=WARN
Hope it will help you.
Logging in such as frameworks (like jsf) is more specific from time to time.
http://java.sun.com/javaee/javaserverfaces/docs/README
see "Logging support and configuration steps" section.
log4j.logger.com.sun.faces
Hope it will help you.
Logging in such as frameworks (like jsf) is more specific from time to time.
http://java.sun.com/javaee/javaserverfaces/docs/README
see "Logging support and configuration steps" section.
ASKER
Ops! There's something wrong here. I removed the log4j.properties and the console log became equals to the attached file 1. When I just put it again, the console backs to the attached file 2. When I remove the lines below from the log4j.properties, nothing changes.
log4j.logger.org.apache.ca talina=WAR N
log4j.logger.org.hibernate .cfg=WARN
log4j.logger.com.sun.faces =WARN
log4j.logger.com.sun.faces .config.Co nfigureLis tener=WARN
I'm thinking that the log4j.properties is filtering some messages, but when the messages cames from JSF, the messages comes from another way that the filter doesn't works. Some idea?
Thanks a lot again...
Console1.txt
log4j.logger.org.apache.ca
log4j.logger.org.hibernate
log4j.logger.com.sun.faces
log4j.logger.com.sun.faces
I'm thinking that the log4j.properties is filtering some messages, but when the messages cames from JSF, the messages comes from another way that the filter doesn't works. Some idea?
Thanks a lot again...
Console1.txt
ASKER
Attached file 2:
Console2.txt
Console2.txt
Yes, there is something wrong!!! :-(
First of all, let's check for possible mistakes.
1. log4j.properties should be in your WEB-INF/classes folder, it means you have to keep it in src folder and after building of the application to go to
WEB-INF/classes?
2. Check that there is no commons-logging.properties file presented in your WEB-INF/classes folder.
3. Check that commons-logging jar is not presented in your lib folder.
After cheking this try again.
If you still got the messages from jsf you can try another solution.
Probably JSF uses only the standart Logger to log msgs. I don't know that, I've never logged jsf msgs, but in order to workaround this you can set explicitly the right logger.
Create your own commons-logging.properties file and add this line:
org.apache.commons.logging .Log=org.a pache.comm ons.loggin g.impl.Log 4JLogger
In this way Log4JLogger will be used.
>>When I remove the lines below from the log4j.properties, nothing changes.
log4j.logger.org.apache.ca talina=WAR N
log4j.logger.org.hibernate .cfg=WARN
log4j.logger.com.sun.faces =WARN
log4j.logger.com.sun.faces .config.Co nfigureLis tener=WARN
Yes, this is because the log level of the root logger - WARN is the same like log level of the loggers in this lines.
P.S. For the second solution you need to put back your commons-logging jar file in your lib folder.
Hope it will help you!
First of all, let's check for possible mistakes.
1. log4j.properties should be in your WEB-INF/classes folder, it means you have to keep it in src folder and after building of the application to go to
WEB-INF/classes?
2. Check that there is no commons-logging.properties
3. Check that commons-logging jar is not presented in your lib folder.
After cheking this try again.
If you still got the messages from jsf you can try another solution.
Probably JSF uses only the standart Logger to log msgs. I don't know that, I've never logged jsf msgs, but in order to workaround this you can set explicitly the right logger.
Create your own commons-logging.properties
org.apache.commons.logging
In this way Log4JLogger will be used.
>>When I remove the lines below from the log4j.properties, nothing changes.
log4j.logger.org.apache.ca
log4j.logger.org.hibernate
log4j.logger.com.sun.faces
log4j.logger.com.sun.faces
Yes, this is because the log level of the root logger - WARN is the same like log level of the loggers in this lines.
P.S. For the second solution you need to put back your commons-logging jar file in your lib folder.
Hope it will help you!
ASKER
Oh man, I'm sorry. But is not working yet... Let's check the steps again:
About the 1 step: My log4j.properties it's only in the $CATALINA_HOME/lib folder, not in the folders of my projects. Do I need to put in another folder?
2: In the $CATALINA_HOME/conf folder there is only the file logging.properties.bak (the old logging.properties file). I renamed to commons-logging.properties and added the line "org.apache.commons.loggin g.Log=org. apache.com mons.loggi ng.impl.Lo g4JLogger" but doesn't works (I'm sending attached).
3. No, it's only in the "conf" folder.
Well... It's only this... Sorry for take your time...
commons-logging.properties.txt
About the 1 step: My log4j.properties it's only in the $CATALINA_HOME/lib folder, not in the folders of my projects. Do I need to put in another folder?
2: In the $CATALINA_HOME/conf folder there is only the file logging.properties.bak (the old logging.properties file). I renamed to commons-logging.properties
3. No, it's only in the "conf" folder.
Well... It's only this... Sorry for take your time...
commons-logging.properties.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey... Very interesting... See how my console is showing now... Well... Now, if I'm understanding, I will see only errors and warnings at all, ok? Left only one message "INFO", but I think that it's not a problem... Don't you think? Can I close this topic? Can I thank you very much??? :)
Console.jpg
Console.jpg
>> Left only one message "INFO", but I think that it's not a problem...
As I can see this INFO msg is from context logger, so adding this line
javax.enterprise.resource. webcontain er.jsf.con text.level =WARNING
to your logging.properties file should remove it.
Here are all lines that concerns JSF logging :
javax.enterprise.resource. webcontain er.jsf.app lication.l evel=INFO
javax.enterprise.resource. webcontain er.jsf.res ource.leve l=INFO
javax.enterprise.resource. webcontain er.jsf.con fig.level= INFO
javax.enterprise.resource. webcontain er.jsf.con text.level =INFO
javax.enterprise.resource. webcontain er.jsf.fac elets.leve l=INFO
javax.enterprise.resource. webcontain er.jsf.lif ecycle.lev el=INFO
javax.enterprise.resource. webcontain er.jsf.man agedbean.l evel=INFO
javax.enterprise.resource. webcontain er.jsf.ren derkit.lev el=INFO
javax.enterprise.resource. webcontain er.jsf.tag lib.level= INFO
javax.enterprise.resource. webcontain er.jsf.tim ing.level= INFO
I have added only some of them, that's way this INFO msg was left!
So add the line manually, next to the lines that concerns jsf logging (in logging.preoperties file) and the msg sould disappear.
I didn't know that Sun's implementation of jsf uses standard jdk logging. Now I know it! :-)
That's way spring, hibernate and all of the other msgs, logged from log4j have to be controlled from log4j.properties file. The msgs logged from the standard jdk logger have to be contrlled from logging.properties file.
Keep in mind that log level set for log4j.rootLogger is valid for all of the other loggers not set explicitly.
>> Now, if I'm understanding, I will see only errors and warnings at all, ok?
Yes
I have to thank you! :-) because I learned new things about tomcat 6 logging...
As I can see this INFO msg is from context logger, so adding this line
javax.enterprise.resource.
to your logging.properties file should remove it.
Here are all lines that concerns JSF logging :
javax.enterprise.resource.
javax.enterprise.resource.
javax.enterprise.resource.
javax.enterprise.resource.
javax.enterprise.resource.
javax.enterprise.resource.
javax.enterprise.resource.
javax.enterprise.resource.
javax.enterprise.resource.
javax.enterprise.resource.
I have added only some of them, that's way this INFO msg was left!
So add the line manually, next to the lines that concerns jsf logging (in logging.preoperties file) and the msg sould disappear.
I didn't know that Sun's implementation of jsf uses standard jdk logging. Now I know it! :-)
That's way spring, hibernate and all of the other msgs, logged from log4j have to be controlled from log4j.properties file. The msgs logged from the standard jdk logger have to be contrlled from logging.properties file.
Keep in mind that log level set for log4j.rootLogger is valid for all of the other loggers not set explicitly.
>> Now, if I'm understanding, I will see only errors and warnings at all, ok?
Yes
I have to thank you! :-) because I learned new things about tomcat 6 logging...
ASKER
hehehe... You're a very smart person... :)
Well... I want to tell you that it's all right, but the line that you want that I put in the logging.properties already has in that file. I'm sending the file attached (with .txt extension). There is another thing missing here... Don't you think?
logging.properties.txt
Well... I want to tell you that it's all right, but the line that you want that I put in the logging.properties already has in that file. I'm sending the file attached (with .txt extension). There is another thing missing here... Don't you think?
logging.properties.txt
Hmmmm...?! :-) What is missing?!
This line was not presented in the first version of the file?!
This line was not presented in the first version of the file?!
ASKER
Yes... But the console is showing the INFO message yet, like the Comment ID: 33543739.
What I'm trying to say is that when you said:
"As I can see this INFO msg is from context logger, so adding this line
javax.enterprise.resource. webcontain er.jsf.con text.level =WARNING
to your logging.properties file should remove it."
The line "javax.enterprise.resource .webcontai ner.jsf.co ntext.leve l=WARNING" was already in the logging.properties.
Understand?
What I'm trying to say is that when you said:
"As I can see this INFO msg is from context logger, so adding this line
javax.enterprise.resource.
to your logging.properties file should remove it."
The line "javax.enterprise.resource
Understand?
Hmmm... Very strange! :-(
Probably this msg comes from a logger which is not in the list in logging.properties file.
I saw that the base jsf logger is defined in this way :
javax.enterprise.resource. webcontain er.jsf
so try with adding this line to logging.properties file:
javax.enterprise.resource. webcontain er.jsf.lev el=WARNING
but I'm not sure about that, it's just a suggestion...
Probably this msg comes from a logger which is not in the list in logging.properties file.
I saw that the base jsf logger is defined in this way :
javax.enterprise.resource.
so try with adding this line to logging.properties file:
javax.enterprise.resource.
but I'm not sure about that, it's just a suggestion...
ASKER
Hum... Don't works... I'm still seeing this messages attached... But, if this is a problem, don't worry... I can close this topic... Hey, is permitted to send e-mails here? I wanna ask one thing to you. If yes, mine is arthur_info yahoo com br.
Thanks for all...
Thanks for all...
0 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:vale-transporte' did not find a matching property.
3 [main] WARN org.apache.commons.digester.Digester - [SetPropertiesRule]{Server/Service/Engine/Host/Context/Realm} Setting property 'debug' to '99' did not find a matching property.
31/08/2010 14:45:03 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_05-b06-FCS) for context '/vale-transporte'
Very strange! I googled for this and I found the code of this class. See :
http://grepcode.com/file/repository.jboss.com/maven2/javax.faces/jsf-impl/1.2_04-p02/com/sun/faces/config/ConfigureListener.java
the logger is instantiated in the right way, so this msg is not from this logger. May be from the global logger, I don't know?!
I thing that it's a kind of oversight and the developers from Sun will fix this in the next release?!
http://grepcode.com/file/repository.jboss.com/maven2/javax.faces/jsf-impl/1.2_04-p02/com/sun/faces/config/ConfigureListener.java
the logger is instantiated in the right way, so this msg is not from this logger. May be from the global logger, I don't know?!
I thing that it's a kind of oversight and the developers from Sun will fix this in the next release?!
>> Hey, is permitted to send e-mails here?
I don't know. Why not?! I've seen that other guys have emails in their profiles...
my is v__i__k hotmail com
I don't know. Why not?! I've seen that other guys have emails in their profiles...
my is v__i__k hotmail com
ASKER
No problem Valeri. I'll close this topic ok? Thanks a lot by everything.
trace, debug, info, warn, error, fatal
So for Log4J ypu should have
log4j.rootLogger = WARN, X