-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no way to turn off status logging #3577
Comments
Can you add more context, what kind of application are you running? Did you try:
?
will actually set the
(the proper capitalization of the property is |
@voddan, judging from your earlier tickets on customizing the Status Logger behavior, and then here asking for how to disable the status logger, IMHO, you're trying to fix the wrong thing. There is a network connectivity issue, and your appender is reporting its failing state – this is all normal. I assume, in an ideal environment network connectivity should be pretty stable. If in your environment it is not, you might consider introducing a Failover Appender. This said, the Socket Appender (i.e., |
@vy You are right in that I have a bigger problem than described in this ticket. I created separate tickets because several approaches to it did not work. Ideally, I would like to be able to turn off StatusLogging completely, independent of the bigger picture, and this is what this ticket is about.
That's exactly what I found out in my testing - having a Failover does not help with StatusLogger spamming to the console. If you create a ticket about that problem, please link it here and I will upvote it! |
@voddan, please follow the assistance @ppkarwasz has kindly provided above, and let us know of the outcome. If it doesn't work for you, you might want to troubleshoot how |
Thank you for detailed suggestions, however I tried all the variations you mentioned, with the same effect - StatusLogger still prints to Console after about 20-25 seconds after startup.
I think we use both JAVA_OPTS and JAVA_TOOL_OPTIONS with no issues in other places in our application. You can also see from the log below that JVM parameters do get passed. Here is the start of the logs until log4j is configured, with some parts redacted out for security:
|
@vy let me know if you need more logging output in addition to what I already posted. I am willing to help you to reproduce this behavior on your end. However please spare me debugging library code I have no expertise in. |
Either one of these should be OK. Are you still experiencing problems? You can force a status logger Note that these messages do not come from status logger.
|
I agree, exceptions should not be logged, but wrapped in an |
Description
Status logger keeps printing to console despite me setting it to OFF in all ways I could think of:
set JAVA_OPTS=%JAVA_OPTS% -Dlog4j2.StatusLogger.level="OFF"
set JAVA_OPTS=%JAVA_OPTS% -Dlog4j2.StatusLoggerLevel="OFF"
<Configuration monitorInterval="60" status="OFF">
Configuration
Version: 2.24.3
Operating system: Windows 11
JDK: Amazon Correto 17.0.12
Logs
The exception I get (it can repeat itself many times, this is jus one part):
Reproduction
My log4j2 configuration has a Socket appender
When there are network problems, it fails with exception "Unable to write to stream TCP:127.0.0.1:1234560 for appender". When I set status logging to OFF I expect those errors to disappear from my console. Instead something weird happens: instead of printing those exceptions right away on configuration loading, the app starts working without them, but then prints them anyways 20-30 seconds later.
The text was updated successfully, but these errors were encountered: