You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by er...@orange.com on 2013/04/10 17:18:03 UTC

SyslogAppender and remote rsyslog server

Hello,

 

I send Tomcat logs to a remote rsyslog server via a SyslogAppender.

 

My appender configuration is the following :

 

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

  <param name="SyslogHost" value="xx.xx.xx.xx"/>

  <param name="Facility" value="local3"/>

  <param name="FacilityPrinting" value="true"/>

  <layout class="org.apache.log4j.PatternLayout">

    <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} [%t] %-5p (%c{5}:%L) - %m%n" />

  </layout>

</appender>

 

The rsyslog server receives correctly the Tomcat logs but the rsyslog $hostname variable contains the IP address of the Tomcat server.

 

Could you tell me if it's possible to get the Tomcat server hostname instead of its IP address ?

 

Thanks in advance for your help.

 

Regards

 

PS : Log4j release : log4j-1.2.16

       Tomcate release : 6.0.35

       OS : Red Hat Enterprise Linux Server release 5.5 (Tikanga)

 

Éric


_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.
Thank you.