Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

change log4j fileAppender #1326

Merged
merged 1 commit into from
Dec 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions agent/src/main/resources/lib/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,33 @@
<!-- %L(line number) option is extremely slow. -->
<!--<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-30c{1}) %m%n" />-->
</layout>

</appender>

<appender name="rollingFile" class="org.apache.log4j.RollingFileAppender">
<param name="file" value="${pinpoint.log}/${pinpoint.agentId}-pinpoint.log" />
<param name="append" value="true" />
<param name="maxFileSize" value="10MB"/>
<param name="maxBackupIndex" value="20"/>
<layout class="org.apache.log4j.EnhancedPatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-35c{1.}:%-3L) %m%n" />
<!-- %L(line number) option is extremely slow. -->
<!--<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-30c{1}) %m%n" />-->
</layout>
</appender>

<logger name="com.navercorp.pinpoint" additivity="false">
<level value="DEBUG" />
<!-- for development mode -->
<appender-ref ref="console" />
<!-- for release mode -->
<appender-ref ref="dailyRollingFile" />
<appender-ref ref="rollingFile" />
</logger>



<root>
<level value="DEBUG" />
<!-- for development mode -->
<appender-ref ref="console" />
<!-- for release mode -->
<appender-ref ref="dailyRollingFile" />
<appender-ref ref="rollingFile" />
</root>
</log4j:configuration>
18 changes: 13 additions & 5 deletions quickstart/agent/src/main/resources/lib/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,29 @@
<!-- %L make a huge performance degradation in order to print out line numbers -->
<!--<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-30c{1}) %m%n" />-->
</layout>

</appender>

<appender name="rollingFile" class="org.apache.log4j.RollingFileAppender">
<param name="file" value="${pinpoint.log}/${pinpoint.agentId}-pinpoint.log" />
<param name="append" value="true" />
<param name="maxFileSize" value="10MB"/>
<param name="maxBackupIndex" value="20"/>
<layout class="org.apache.log4j.EnhancedPatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-35c{1.}:%-3L) %m%n" />
<!-- %L(line number) option is extremely slow. -->
<!--<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-30c{1}) %m%n" />-->
</layout>
</appender>

<logger name="com.navercorp.pinpoint" additivity="false">
<level value="DEBUG" />
<appender-ref ref="console" />
<appender-ref ref="dailyRollingFile" />
<appender-ref ref="rollingFile" />
</logger>



<root>
<level value="DEBUG" />
<appender-ref ref="console" />
<appender-ref ref="dailyRollingFile" />
<appender-ref ref="rollingFile" />
</root>
</log4j:configuration>