Skip to content

Commit

Permalink
Improved logging configuration.
Browse files Browse the repository at this point in the history
This configuration will log esg.search events to a separate file "esg-search.log".
It will also include the timestamp of each log entry which makes it much more useful.
  • Loading branch information
stephenpascoe committed Nov 25, 2014
1 parent 0ca7f2e commit c95e2a4
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/java/main/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@
</layout>
</appender>

<appender name="search_log" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${catalina.base}/logs/esgf-search.log"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- TODO: add datetime? -->
<param name="conversionPattern" value="%d [%p] %C: %m %n"/>
</layout>
</appender>
<logger name="esg" additivity="false">
<level value="DEBUG" />
<level value="INFO" />
<appender-ref ref="stdout" />
</logger>

Expand All @@ -40,7 +47,12 @@

<logger name="org.apache.solr" additivity="false">
<level value="INFO" />
<appender-ref ref="stdout" />
<appender-ref ref="search_log" />
</logger>
<logger name="esg.search" addiitivity="false">
<level value="INFO" />
<appender-ref ref="search_log" />
</logger>


</log4j:configuration>

0 comments on commit c95e2a4

Please sign in to comment.