Skip to content

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

Open
@michaelassraf

Description

@michaelassraf

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @michaelassraf

        Issue actions

          Log4J2 Configuration is being ignored by com.cloudbees.syslog.sender.TcpSyslogMessageSender · Issue #130 · jenkinsci/syslog-java-client