|
|
|
log4j:WARN No appenders could be found for logger (использую Spring)
|
|||
|---|---|---|---|
|
#18+
При старте кота вываливаются эти красные ванинги: log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. в WEB-INF/ лежит файл log4.properties Это кусок web.xml <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.properties</param-value> </context-param> <servlet> <servlet-name>context</servlet-name> <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> в чем проблема? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.04.2005, 08:59 |
|
||
|
log4j:WARN No appenders could be found for logger (использую Spring)
|
|||
|---|---|---|---|
|
#18+
вообщето log4j.properties должен находиться в WEB-INF/classes а не в WEB-INF ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.04.2005, 10:49 |
|
||
|
log4j:WARN No appenders could be found for logger (использую Spring)
|
|||
|---|---|---|---|
|
#18+
для полноты картины: http://logging.apache.org/log4j/docs/manual.html Default Initialization under Tomcat The default log4j initialization is particularly useful in web-server environments. Under Tomcat 3.x and 4.x, you should place the log4j.properties under the WEB-INF/classes directory of your web-applications. Log4j will find the properties file and initialize itself. This is easy to do and it works. 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. ... Example 4 The Windows shell command Код: plaintext tells log4j to use the file c:\foobar.lcf as the default configuration file. The configuration file is fully specified by the URL file:/c:/foobar.lcf. Thus, the same configuration file will be used for all web-applications. ... Initialization servlet It is also possible to use a special servlet for log4j initialization. Here is an example, Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. Define the following servlet in the web.xml file for your web-application. Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Writing an initialization servlet is the most flexible way for initializing log4j. There are no constraints on the code you can place in the init() method of the servlet. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.04.2005, 11:19 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=33010042&tid=2152604]: |
0ms |
get settings: |
5ms |
get forum list: |
11ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
47ms |
get topic data: |
7ms |
get forum data: |
1ms |
get page messages: |
24ms |
get tp. blocked users: |
1ms |
| others: | 207ms |
| total: | 307ms |

| 0 / 0 |
