Configuring Solr 1.4 logging with Log4J in Tomcat
来源:互联网 发布:扫码签到软件 编辑:程序博客网 时间:2024/05/17 10:27
Solr 1.4 logging is based on the “SLF4J” API. To configure Solr to use Log4J as standard logging implementation deploy the Solr web application to your Tomcat. Once the Solr web application got started add the libraries “slf4j-log4j12-1.5.5.jar” and “log4j-1.2.15.jar” to $CATALINA_HOME/webapps/solr/WEB-INF/lib
. Delete the library “slf4j-jdk14-1.5.5.jar” from $CATALINA_HOME/webapps/solr/WEB-INF/lib
.
Create the directory $CATALINA_HOME/webapps/solr/WEB-INF/classes
and add the file log4j.properties
. The file should hold your Log4J configuration. Here’s an example using a rolling log file:
1
log4j.rootLogger=ERROR, logfile
2
3
log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
4
log4j.appender.logfile.File=${catalina.home}/logs/solr.log
5
6
log4j.appender.logfile.DatePattern='.'yyyy-MM-dd
7
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
8
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c{3}] - [%t] - %X{ip}: %m%n
Alternatively, you can prepare your Solr web application WAR file to reflect the steps mentioned above. The Solr logging page (http://<host>:<port>/solr/admin/logging
) that comes with the web app will not reflect these changes. It only works for JDK logging that we just configured not to be used anymore. The Tomcat instance has to be restarted to reflect the changes.
- Configuring Solr 1.4 logging with Log4J in Tomcat
- Configuring Jetty Logging using log4j.properties
- solr-in-action-ch4-Configuring Solr
- MariaDB_installing,starting and stoping,configuring,logging in
- Logging in Tomcat
- Solr with Apache Tomcat
- tomcat logging using log4j 之 文件分割
- Configuring Logging(Python)
- No directory, logging in with HOME=/
- Configuring Database Access in Eclipse 3.0 with SQLExplorer
- create log by common-logging and log4j in java project
- Solr logging 配置
- How to do logging in C# with log4net
- Getting Started with Django Logging in 5 Minutes
- MySQL 5.7 No directory, logging in with HOME=/
- mysql5.7.20 No directory, logging in with HOME=/
- Debug in Eclipse with Tomcat
- How to configure Log4j in Tomcat
- Java相关的基础知识
- 这么多贱的话,总有一句贱到你心里了
- Gallery Server Pro (学习笔记)
- Excel 2007 六则技巧 帮你省时间
- How to get socket port number if it's system assigned
- Configuring Solr 1.4 logging with Log4J in Tomcat
- OnPaletteChanged(CWnd* pFocusWnd) 和OnQueryNewPalette() 的作用
- 语录
- 无奈
- 2010提升你幽默感的经典短句
- voice-family: "/"}/"";的作用
- 神奇的大脑
- 如何在不安装Word的情况下生成Word文档 ——转【陈希章】
- Miscellaneous Single-Row Functions