Bug 52797 - SyslogAppender ignores the whole message
Summary: SyslogAppender ignores the whole message
Status: NEW
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 major
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 16:05 UTC by rui.abreu
Modified: 2012-02-29 16:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rui.abreu 2012-02-29 16:05:28 UTC
Using Jboss 6.0.1:

In deploy/jboss-logging.xml I have the following configuration:

 

 

<log4j-appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">

      <error-manager>

         <only-once/>

      </error-manager>

 

        <level name="DEBUG"/>

 

      <properties>

         <property name="facility">USER</property>

         <property name="facilityPrinting">false</property>

         <property name="syslogHost">localhost</property>

         <property name="header">true</property>

      </properties>

 

      <formatter>

         <pattern-formatter pattern="%p %d{dd MMM yyyy HH:mm:ss,SSS} %c - %m%n"/>

      </formatter>

   </log4j-appender>

 

 

The message gets through to rsyslog, but only the "%m" part of the pattern  gets there. I've tried with different patterns and also commented out the <formatter> part and the result is the same.
Using the command  logger -p FACILITY "MESSAGE" I can test rsyslog and it's working fine, so my understanding is that JBoss + Log4j is not sending the full log message.