tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chandrashekar H.S <schan...@kodiakptt.com>
Subject RE: logging to syslog
Date Wed, 15 Feb 2017 03:37:31 GMT
Yes,
Its possible, using the below log4j configuration.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="CATALINA" class="org.apache.log4j.net.SyslogAppender">
     <param name="Facility" value="auth"/>
     <param name="SyslogHost" value="127.0.0.1\:1517"/>
    <layout class="org.apache.log4j.TTCCLayout"> 
      <param name="ContextPrinting" value="true"/>
      <param name="DateFormat" value="ISO8601"/>
    </layout> 
  </appender>
  <appender name="CONSOLE" class="org.apache.log4j.net.SyslogAppender"> 
    <param name="Facility" value="auth"/> 
    <param name="SyslogHost" value="127.0.0.1\:1517"/>
    <layout class="org.apache.log4j.TTCCLayout"> 
      <param name="ContextPrinting" value="true"/>
      <param name="DateFormat" value="ISO8601"/>
    </layout> 
  </appender>
<logger name="org.apache.catalina.core.ContainerBase.[Catalina].[localhost]">
        <level value="INFO"/>
        <appender-ref ref="LOCALHOST"/>
    </logger>
    <root>
        <level value="INFO"/>
        <appender-ref ref="CATALINA"/>
    </root>
</log4j:configuration>

--Chandra

-----Original Message-----
From: Schöke, Karsten [mailto:Karsten.Schoeke@geobasis-bb.de] 
Sent: Tuesday, February 14, 2017 7:21 PM
To: users@tomcat.apache.org
Subject: logging to syslog

Hello,

it' possible that all messages in catalina.out also log to syslog?
I use tomcat7 under Debian Jessie.

Thx
Karsten


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message