Skip to content

Commit

Permalink
Add line number to the logs (%L)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattia Bertorello authored and cmaglie committed Aug 2, 2019
1 parent adabb08 commit a80fd4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

<!-- Console Appender -->
<Console name="Console" target="SYSTEM_ERR">
<PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.} [%t] %m%n" />
<PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.}:%L [%t] %m%n"/>
</Console>

<!-- Rolling File Appender -->
<RollingFile name="RollingFile" fileName="${sys:log4j.saveDirectory}/logs/application.log"
filePattern="${sys:log4j.saveDirectory}/logs/application-%d{MM-dd-yyyy}-%i.log.gz"
ignoreExceptions="false">
<PatternLayout>
<Pattern>%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.} [%t] %m%n</Pattern>
<Pattern>%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC} %p %c{1.}:%L [%t] %m%n</Pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="50 MB"/>
Expand Down

0 comments on commit a80fd4a

Please sign in to comment.