From users-return-267598-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Thu May 23 08:14:21 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id F17D318062F for ; Thu, 23 May 2019 10:14:20 +0200 (CEST) Received: (qmail 35249 invoked by uid 500); 23 May 2019 08:14:18 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 35238 invoked by uid 99); 23 May 2019 08:14:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 May 2019 08:14:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 618FEC2E05 for ; Thu, 23 May 2019 08:14:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.801 X-Spam-Level: * X-Spam-Status: No, score=1.801 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id wzMseZ6n-3I0 for ; Thu, 23 May 2019 08:14:15 +0000 (UTC) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 908FC5F1C7 for ; Thu, 23 May 2019 08:14:15 +0000 (UTC) Received: by mail-io1-f54.google.com with SMTP id g84so4160263ioa.1 for ; Thu, 23 May 2019 01:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=5lixXKNfICdUdvVuub2ZTTG9PZpPnexQ77nhF7SNDhA=; b=COsP8iuRGiXMhAbt+QQ7FVvH+Ywd8eKL/JfPKyb2nORXQ9Wr/hhPRULVuyk/vXC6YD wE27KkaXmaJIFO7G3W3TpilEk8uUWiNJpTl22CP4ArGFPWLKxySYsGRiqBebZ+NSXn5M qOOydIZ5DR+Bqji3DW5hUS3n3JKRKEaSmTLE7/Xg/7st0D7zZ8IsvSTZOBHV+EBgv7nh q8u1eDJC7ctsrEkM7xvOS6Q8070CmS95DAYtBXyD0k82QYpkM1gcMS3XE9s/+rPqTb3A 47n7DBmqPgAi0WzIH0QOetJwfugALjTB0gPE4lIOUzN5/9phnajxjOwjvhKcAFVQG6kH k8bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=5lixXKNfICdUdvVuub2ZTTG9PZpPnexQ77nhF7SNDhA=; b=VfklwMFAkQO9hl6x36H7gqPhIdcHrkqjpDt5rBS/dtcTHAiYJ+YjjMQd/ShgaJuDbS E75ZJs+OIr6NlmIjMkU5T0qvBHBDJ/EIkKVp92aLlzW60/hpR6cS6w2dZqJxGfJ4OsWO XHRy+vHJhcRe3XmU3QUj1Wwc99OVYhcrurXwkK49+Pnuv0KZ6qsCxSteQVC2YJG6n78u YcOyjvMCEqLT/0lX75RkspdYFZibltyYVRC99CCzgfKs5vaN5LaFf8JH5jdaBFr1HweQ JW/CM8pwau6YlliDIYjCq66cAxKxtjpaUetgRCLXKD42dmnVUNyyRUopbHb5KRpxANlP 7qgw== X-Gm-Message-State: APjAAAX9cI4IayvYi3DHjTDxwM4t4x+JCj7+tvnsokGCbU313S551uuJ zCZ/+4R8LqdN/Z4qJCQLId8FEFpwPh48rP1b7w5450Ph X-Google-Smtp-Source: APXvYqyLw+WO5uqHo9V/C2yxJlYaVOV7zqO9p8z/vW3IbwUJ8efS9DZSc5AJs91uZbZ3wuqBePVa5TE3qXqjUbA4vRU= X-Received: by 2002:a05:6602:218d:: with SMTP id b13mr36620295iob.96.1558599254742; Thu, 23 May 2019 01:14:14 -0700 (PDT) MIME-Version: 1.0 References: <1d87c64ea0fb4c8693c0141e4b2c8e46@dnb.de> In-Reply-To: <1d87c64ea0fb4c8693c0141e4b2c8e46@dnb.de> From: Joan Date: Thu, 23 May 2019 10:14:04 +0200 Message-ID: Subject: Re: Configuring log format for console output (catalina.out) To: Tomcat Users List Content-Type: multipart/alternative; boundary="000000000000ed1a09058989aab0" --000000000000ed1a09058989aab0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Guido, I hope that with the rsyslog magic (see startmsg.regex=3D"^[[:digit:]]{2}-[[:alpha:]]{3}-[[:digit:]]{4} [[:digit:]]{1,2}:[[:digit:]]{1,2}:[[:digit:]]{1,2}\\.[[:digit:]]{3}" for the reference), I will be able to group this messages, otherwise I'll jump into your solution. Joan Missatge de J=C3=A4kel, Guido del dia dc., 22 de maig 201= 9 a les 8:55: > Dear Joan, > > by use of the common scripts, the file catalina.out will contain the > console output (stdout/tderr) of the *JVM* process and -- if not configur= ed > in another way -- of the applications. Therefore, you have to deal with t= he > features of output formatting of current JVMs. Or -- as me -- you might > pipe this file descriptors through a tiny script that will prepend a > timestamp in a format of your choice. This will have the advantage that i= t > also handle "console" output of Java application; despite of the fact tha= t > using stdout/stderr instead of a java logging mechanism is a very bad sty= le. > > If you don't need to process thousands of lines per second, a simple shel= l > script may do the job: > > while read line; do echo "`date -Ins` $line"; done > > To avoid "double-stamping", you may add an heuristic check of the incomin= g > line; please adjust the RegExpr to your neeeds > > while read line; do [[ ! "$line" =3D~ ^\d\d\d\d ]] && echo -n > "[`date -Ins`] "; echo $line; done > > > Guido > --000000000000ed1a09058989aab0--