Skip to content

Commit bcc11e8

Browse files
committed
Fix lost application logs in plugin test scenarios
Capture both stdout and stderr in scenario.out by redirecting stderr in run.sh. Previously only stdout was captured, but all 90+ scenarios use SYSTEM_ERR in log4j2.xml. Also raise log level from WARN to INFO for rocketmq scenarios to capture useful debug messages.
1 parent 9f916fe commit bcc11e8

File tree

3 files changed

+3
-3
lines changed
  • test/plugin
    • containers/jvm-container/src/main/docker
    • scenarios

3 files changed

+3
-3
lines changed

test/plugin/containers/jvm-container/src/main/docker/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export agent_opts="
8484
-Dskywalking.meter.report_interval=1
8585
-Xms256m -Xmx256m ${agent_opts}"
8686

87-
bash /var/run/${SCENARIO_NAME}/${SCENARIO_START_SCRIPT} 1>${LOGS_HOME}/scenario.out &
87+
bash /var/run/${SCENARIO_NAME}/${SCENARIO_START_SCRIPT} >${LOGS_HOME}/scenario.out 2>&1 &
8888
sleep 5
8989

9090
healthCheck ${SCENARIO_HEALTH_CHECK_URL}

test/plugin/scenarios/rocketmq-5-grpc-scenario/src/main/resources/log4j2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</Console>
2424
</Appenders>
2525
<Loggers>
26-
<Root level="WARN">
26+
<Root level="INFO">
2727
<AppenderRef ref="Console"/>
2828
</Root>
2929
</Loggers>

test/plugin/scenarios/rocketmq-scenario/src/main/resources/log4j2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</Console>
2424
</Appenders>
2525
<Loggers>
26-
<Root level="WARN">
26+
<Root level="INFO">
2727
<AppenderRef ref="Console"/>
2828
</Root>
2929
</Loggers>

0 commit comments

Comments
 (0)