Skip to content
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

Log4J2 Configuration is being ignored by com.cloudbees.syslog.sender.TcpSyslogMessageSender #130

Open
michaelassraf opened this issue Apr 3, 2024 · 0 comments
Labels

Comments

@michaelassraf
Copy link

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Hi,

We're using the syslog library through this maven dep:

       <dependency>
            <groupId>com.cloudbees</groupId>
            <artifactId>syslog-java-client</artifactId>
            <version>1.1.7</version>
            <exclusions>
                <exclusion>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-annotations</artifactId>
                </exclusion>
            </exclusions>
       </dependency>

I'm trying to filter out error log writes such as this one:

com.cloudbees.syslog.sender.TcpSyslogMessageSender - INFO: InetAddress of the Syslog Server have changed, create a new connection. Before=null, new=XXXXXXX

But no matter what I add to the log4j2.xml file, this error persists. Here's log4j2 appenders:

        <Logger name="com.cloudbees.syslog" level="OFF" />
        <Logger name="com.cloudbees.syslog.sender.TcpSyslogMessageSender" level="OFF" />

Michael

Reproduction steps

  1. add the dep
  2. set log appenders to :
        <Logger name="com.cloudbees.syslog" level="OFF" />
        <Logger name="com.cloudbees.syslog.sender.TcpSyslogMessageSender" level="OFF" />
  1. try to send a syslog message with a faulty IP
  2. see the log still writes the error

Expected Results

No log messages when adding:

        <Logger name="com.cloudbees.syslog" level="OFF" />
        <Logger name="com.cloudbees.syslog.sender.TcpSyslogMessageSender" level="OFF" />

Actual Results

Error log writes appear

Anything else?

No response

Are you interested in contributing a fix?

Sure, can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant