tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: AW: logging to syslog
Date Thu, 16 Feb 2017 14:53:33 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Karsten,

On 2/15/17 1:02 AM, Schöke, Karsten wrote:
> Many thx for you hint.
> 
> Where is the right place for this configuration, to log all
> messages from catalina.out to syslog.
> 
> (I use Debian)

catalina.out is where stdout is redirected. If you don't want anything
to end up there, you need to make sure your applications aren't
logging anything to System.out or System.err.

Tomcat can redirect system.out/system.err from an application if you
set swallowOutput="true" on the <Context>, but it's best not to use
system.out/system.err if you can avoid it.

The standard logging configuration also directs some (properly-logged)
output to the console. Since you are specifying your own log4j
configuration, simply do not configure any appenders that write to the
console.

If you still have log messages going to catalina.out, please give us a
sample and let us know how you have configured things.

- -chris

> -----Ursprüngliche Nachricht----- Von: Chandrashekar H.S
> [mailto:schandra@kodiakptt.com] Gesendet: Mittwoch, 15. Februar
> 2017 04:38 An: Tomcat Users List Betreff: RE: logging to syslog
> 
> 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
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYpbztAAoJEBzwKT+lPKRY+rcQAILCDmotq+A8GarkCPUV2v4r
IH7xLqNOSU5gEM2RCZvk9Afm75cpDdCGKOuE02y51L/2mHe8Q0aHSNYE5pTo+DP2
AmWOINK2Q2AR1qQL6JAhsS5RF/ra2If+E3qumGHfWr9tDsjUWHWL8VetmGU6rIrD
AjOhuyQ7XBlMkSMkuCraYuHBDHiSh/EwNxej0UgLCDMPXLECiUcDli+O1mjwdV1t
u8aMVE4fBsOtwF29fU3TrqDzvNofleW72h9jzoRVRhxzuxpnmvdr1vlSczQrBYvq
fmZJeQfYtj46XSJiPUGvtaPUVmJsmsppTD5Ft24FHRmYtFOHZ1HC8wpdsPnwh/oZ
MVuzZCx/28h+e6ytp3V/HXH+G/M4a0IKJgB4hO0QLvloe5PxfpxgWQQplSvmqlKk
cmpCiZMmhPkMZa0hKoYkh+fxTm5R/Wv/RFnkLU14xuRz4ON213rR1LtoxVBGxL6Q
nAuVjEN9g5qVFUQTBRW9x4BU9GsQwpeP5IJlUEjW2R5nNvCYf3vAGL2rQwfnNYLb
8zc7Muzfxn798xefcLahyKDwqOzp8vx31urpfxh/mNkwk5Sp+7hYcyzcdRvp+v9U
fD3ACN2775G9lRLaQ1/bWpq67T+ggeG/pq0h7SvD2hoBVcg3clu877I2K1jlIE62
uqvvmTakvfmllhBghEFq
=m4H0
-----END PGP SIGNATURE-----

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


Mime
View raw message