Skip to content

Commit

Permalink
Merge branch 'log4j' into '2.8.1.1' (merge request !34)
Browse files Browse the repository at this point in the history
add nolookup for log4j pattern
Fixes https://git.woa.com/MQ/pulsar/issues/27

### Motivation

add nolookup for log pattern

### Modifications

add nolookup for log pattern
  • Loading branch information
mayozhang committed Dec 20, 2021
2 parents 65a86ff + 879e928 commit 4c14cfe
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions conf/log4j2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Configuration:
name: Console
target: SYSTEM_OUT
PatternLayout:
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg{nolookups}%n"

# Rolling file appender configuration
RollingFile:
Expand All @@ -65,7 +65,7 @@ Configuration:
filePattern: "${sys:pulsar.log.dir}/${sys:pulsar.log.file}-%d{MM-dd-yyyy}-%i.log.gz"
immediateFlush: true
PatternLayout:
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg{nolookups}%n"
Policies:
TimeBasedTriggeringPolicy:
interval: 1
Expand Down Expand Up @@ -117,7 +117,7 @@ Configuration:
fileName : "${sys:pulsar.log.dir}/functions/${ctx:function}/${ctx:functionname}-${ctx:instance}.log"
filePattern : "${sys:pulsar.log.dir}/functions/${sys:pulsar.log.file}-${ctx:instance}-%d{MM-dd-yyyy}-%i.log.gz"
PatternLayout:
Pattern: "%d{ABSOLUTE} %level{length=5} [%thread] [instance: %X{instance}] %logger{1} - %msg%n"
Pattern: "%d{ABSOLUTE} %level{length=5} [%thread] [instance: %X{instance}] %logger{1} - %msg{nolookups}%n"
Policies:
TimeBasedTriggeringPolicy:
interval: 1
Expand All @@ -130,13 +130,13 @@ Configuration:
schedule: "0 0 0 * * ?"
# Delete file older than 30days
DefaultRolloverStrategy:
Delete:
basePath: ${sys:pulsar.log.dir}
maxDepth: 2
IfFileName:
glob: "*/${sys:pulsar.log.file}*log.gz"
IfLastModified:
age: 30d
Delete:
basePath: ${sys:pulsar.log.dir}
maxDepth: 2
IfFileName:
glob: "*/${sys:pulsar.log.file}*log.gz"
IfLastModified:
age: 30d
- ref: "${sys:pulsar.routing.appender.default}"
key: "${ctx:function}"
- ref: "${sys:pulsar.routing.appender.default}"
Expand Down

0 comments on commit 4c14cfe

Please sign in to comment.