pulsar
pulsar copied to clipboard
change pulsar.log.level in log4j2.yaml not work?
change pulsar.log.level in log4j2.yaml not work?
Describe the bug
i modify the value of pulsar.log.root.level
and pulsar.log.level
from info
to warn
in conf/log4j2.yaml
without restart broker service.
as follow:
as this issue discribe Add ability to log at a dynamic level, log4j2.x support reload conf with process restart.so as expected behavior, after monitorInterval later, broker service log's log level should be not lower than warn
.but in fact, latest output log still is info
.
That's not what we expected.
Version
- pulsar version: 2.7.2
- log4j2 version: 2.17.1
Does anyone have the same problem?
Did you try with 2.9 or current master?
Usually I use a ENV property Also if you are using Pulsar standalone the only way is to use the ENV property
Did you try with 2.9 or current master?
Usually I use a ENV property Also if you are using Pulsar standalone the only way is to use the ENV property
i use 2.7.2 version in product environment and modify log4j2.yaml manual without restart broker. ENV property use default value when deploy broker service. i will try use Pulsar standalone for a test later. thx suggest.
Did you try with 2.9 or current master?
Usually I use a ENV property Also if you are using Pulsar standalone the only way is to use the ENV property
you mean add ENV property such as PULSAR_LOG_LEVEL
in pulsar_env.sh
, then run command /bin/pulsar-daemon start broker
?
Did you try with 2.9 or current master? Usually I use a ENV property Also if you are using Pulsar standalone the only way is to use the ENV property
you mean add ENV property such as
PULSAR_LOG_LEVEL
inpulsar_env.sh
, then run command/bin/pulsar-daemon start broker
?
i have a test, result as follow:
as log4j2.yaml using way,
pulsar.log.level
go into effect only set by ENV property PULSAR_LOG_LEVEL
which set in pulsar_env.sh
while service starting.
while service running, change pulsar.log.level
in log4j2.yaml is not work, pulsar.log.level
is unmodifiable now.
I think we should fix the log4j2.yaml, it has confused many users.
@ethqunzhong @codelipenghui I'll try fix it.
@ethqunzhong @codelipenghui I'll try fix it.
thx a lot. can you help me review this pr https://github.com/apache/pulsar/pull/14200
The issue had no activity for 30 days, mark with Stale label.
The issue had no activity for 30 days, mark with Stale label.
I have the same issue, and made a new PR to fix this: https://github.com/apache/pulsar/pull/22017
Please let us know your thoughts.