From f99387eaac4804c5f959026e684652e4ec77c913 Mon Sep 17 00:00:00 2001 From: hanmz Date: Tue, 19 Mar 2024 16:44:18 +0800 Subject: [PATCH] [improve][broker] Add file name and line number output to the log. --- conf/log4j2.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/log4j2.yaml b/conf/log4j2.yaml index 9c261a6b89a50..f57d93fa1c679 100644 --- a/conf/log4j2.yaml +++ b/conf/log4j2.yaml @@ -56,7 +56,7 @@ Configuration: name: Console target: SYSTEM_OUT PatternLayout: - Pattern: "%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5level %logger{36} - %msg%n" + Pattern: "%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5level %logger{36} (%F:%L) - %msg%n" # Rolling file appender configuration RollingFile: @@ -65,7 +65,7 @@ Configuration: filePattern: "${sys:pulsar.log.dir}/${sys:pulsar.log.file}-%d{MM-dd-yyyy}-%i.log.gz" immediateFlush: ${sys:pulsar.log.immediateFlush} PatternLayout: - Pattern: "%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5level %logger{36} - %msg%n" + Pattern: "%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5level %logger{36} (%F:%L) - %msg%n" Policies: TimeBasedTriggeringPolicy: interval: 1