Ola Here is what I have for this:
########################################################## # # Log4J configuration for SOLR # # http://wiki.apache.org/solr/SolrLogging # # # 1) Download LOG4J: # http://logging.apache.org/log4j/1.2/ # http://logging.apache.org/log4j/1.2/download.html # http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.16/apache-log4j-1.2.16.tar.gz # http://newverhost.com/pub//logging/log4j/1.2.16/apache-log4j-1.2.16.tar.gz # # 2) Download SLF4J: # http://www.slf4j.org/ # http://www.slf4j.org/download.html # http://www.slf4j.org/dist/slf4j-1.6.4.tar.gz # # 3) Unpack Solr: # jar xvf apache-solr-3.5.0.war # # 4) Delete: # WEB-INF/lib/log4j-over-slf4j-1.6.4.jar # WEB-INF/lib/slf4j-jdk14-1.6.4.jar # # 5) Copy: # apache-log4j-1.2.16/log4j-1.2.16.jar -> WEB-INF/lib # slf4j-1.6.4/slf4j-log4j12-1.6.4.jar -> WEB-INF/lib # log4j.properties (this file) -> WEB-INF/classes/ (needs to be created) # # 6) Pack Solr: # jar cvf apache-solr-3.4.0-omim.war admin favicon.ico index.jsp META-INF WEB-INF # # # Author: Francois Schiettecatte # Version: 1.0 # ########################################################## ########################################################## # # Logging levels (helpful reminder) # # DEBUG < INFO < WARN < ERROR < FATAL # ########################################################## # # Logging setup # log4j.rootLogger=WARN, SOLR # Daily Rolling File Appender (SOLR) log4j.appender.SOLR=org.apache.log4j.DailyRollingFileAppender log4j.appender.SOLR.File=${catalina.base}/logs/solr.log log4j.appender.SOLR.Append=true log4j.appender.SOLR.Encoding=UTF-8 log4j.appender.SOLR.DatePattern='-'yyyy-MM-dd log4j.appender.SOLR.layout=org.apache.log4j.PatternLayout log4j.appender.SOLR.layout.ConversionPattern=%d [%t] %-5p %c - %m%n ########################################################## # # Logging levels for SOLR # # Default logging level log4j.logger.org.apache.solr=WARN ########################################################## On Feb 20, 2012, at 5:15 AM, ola nowak wrote: > Yep. I suppose it is. But I have several applications installed on > glassfish and I want each one of them to write into separate file. And Your > solution with this jvm option was redirecting all messages from all apps to > one file. Does anyone knows how to accomplish that? > > > On Mon, Feb 20, 2012 at 11:09 AM, darul <daru...@gmail.com> wrote: > >> Hmm, I did not try to achieve this but interested if you find a way... >> >> After I believe than having log4j config file outside war archive is a >> better solution, if you may need to update its content for example. >> >> -- >> View this message in context: >> http://lucene.472066.n3.nabble.com/Solr-logging-tp3760171p3760322.html >> Sent from the Solr - User mailing list archive at Nabble.com. >>