-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Joan,
On 5/21/19 09:11, Joan wrote: > Hi all, > > I am trying to forward the logs generated on a server to a > centralized log collector (using rsyslog), one of the features I > would like to use the ability to group messages by using their > timestamp as the start of the message. By reading the documentation > at https://tomcat.apache.org/tomcat-9.0-doc/logging.html#Console, I > can't see the proper way to get a common format (preferably with > timestamp), or ar tleast save the outputs into three different > types in different files? I think you are being confused by the fact that the default log pattern contains a newline character. For example, these are the first two entries in my local catalina.out file: Apr 12, 2019 1:55:03 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-nio-8215"] Apr 12, 2019 1:55:03 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read Apr 12, 2019 1:55:03 PM org.apache.coyote.AbstractProtocol init (Apologies for the word-wrapping) The first entry is [Apr 12, 2019 1:55:03 PM] and the text ends with ["ajp-nio-8215"] The second entry has the same timestmp and the text ends with "AbstractProtocol init" Stack traces are always impossible to handle when looking at the resulting file, since they almost always span multiple lines of text - -- that is, they have embedded newlines in the message. Are you asking about how to make sense of the log file, how to send log messages to a central server, or how to coalesce log messages by timestamp? - -chris -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlzkEO8ACgkQHPApP6U8 pFg8EA/+KsH4JGirKakL+/OxqAz1W7T7MoR2QE9Y1Tk26FL6XI+VITk11gqLegH5 yx3zwmXLS9v2XilppnSvRB9xPd073Uf4v0NPSjCt1vSY7obPHYcRSIuA43QU9Pqb 7pEgxuGn+uUifRRK+DLd6Wcd3IkFo2hfKG/YHFL5McKxqsrEvPsspWU7uLRHoKML BR1MM5iKbsiBEJfncfyZqeGY2Yq4HOarcp//iv5bC20RgakLxlSjiWAyJqC77PKH 3dy9XaV/VyQpjEQe8/ADt1NqhF6qBVj/KcKeA41AAwL7grxX0R23ZeSQsKJeulgf jnXcK8mHWXs4Dybu7hhUbkS47whbfW6M3H4ZhGYutsoOB58shzbVR0MUtEYlOBMg GbpCt5xPW6NZ5LMbEDTMlQW95XBnrLdxe8dFdTo+qgEdSoe3o4mdvGUtrlgAxZlq Ay28U+/maI84StrScDwfC96chakdaGj/4CxyFwoj+5uVeeiBbglubR1gCghqVjM7 MQWDKrTACmcEu4ZbLy1sgNtBb/xjCYRtp05JrB531E9Py7//f6qprIKjAYOBLcxF uWDKP204C3UlC3/mQt6Ewd6QzQM0xCXPm0k+6817wf3xIaN/aST4R0kbR0OjkB6F CfAm8Qf2FVgRHOP4zzKHvm82wjET2FJmcw38do2ki89yml1iKXg= =UolI -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org