From log4j-user-return-29074-archive-asf-public=cust-asf.ponee.io@logging.apache.org Fri Aug 24 21:43:20 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 92246180629 for ; Fri, 24 Aug 2018 21:43:19 +0200 (CEST) Received: (qmail 58133 invoked by uid 500); 24 Aug 2018 19:43:18 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 58122 invoked by uid 99); 24 Aug 2018 19:43:18 -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; Fri, 24 Aug 2018 19:43:18 +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 11916C0090 for ; Fri, 24 Aug 2018 19:43:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=ventusproxy.com header.b=etdjxpGQ; dkim=pass (1024-bit key) header.d=ventusproxy.com header.b=etdjxpGQ Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 2OMGPQkGXBK5 for ; Fri, 24 Aug 2018 19:43:16 +0000 (UTC) Received: from mail01.feelhosting.com (mail01.feelhosting.com [137.74.235.62]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id EB98B5F2FF for ; Fri, 24 Aug 2018 19:43:15 +0000 (UTC) Received: from mail01.ad-6bits.net (localhost.localdomain [127.0.0.1]) by mail01.ad-6bits.net (Postfix) with ESMTP id 8E92C40902 for ; Fri, 24 Aug 2018 21:43:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ventusproxy.com; s=default; t=1535139795; bh=59R46QyqSxLgNSJf2WoycDKK/0CdNzQ5geDulxBLBjw=; h=From:To:References:In-Reply-To:Subject:Date; b=etdjxpGQJ3cp+uEfqDb+z5ipTXNfCMzDSgo3gqTDMuoc1y8IUfBWeL62Xut4QsApp maACJn7VriaedIsTJcODitDNt+OMsuocvZG6XW5GtWaB7sP60vHgXGBEw5qHOVLH9G iZfWPnxmMwEncQGLJF95qg8L4fd24lmJ0H5KOzgw= Received: from Ventus (132.red-81-35-141.dynamicip.rima-tde.net [81.35.141.132]) by mail01.ad-6bits.net (Postfix) with ESMTPA id 500D4408FF for ; Fri, 24 Aug 2018 21:43:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ventusproxy.com; s=default; t=1535139795; bh=59R46QyqSxLgNSJf2WoycDKK/0CdNzQ5geDulxBLBjw=; h=From:To:References:In-Reply-To:Subject:Date; b=etdjxpGQJ3cp+uEfqDb+z5ipTXNfCMzDSgo3gqTDMuoc1y8IUfBWeL62Xut4QsApp maACJn7VriaedIsTJcODitDNt+OMsuocvZG6XW5GtWaB7sP60vHgXGBEw5qHOVLH9G iZfWPnxmMwEncQGLJF95qg8L4fd24lmJ0H5KOzgw= From: =?UTF-8?Q?Joan_Balaguer=C3=B3_-_ventusproxy?= To: "'Log4J Users List'" References: <000601d43bc7$ba07c8b0$2e175a10$@ventusproxy.com> <8327DBDD-1ED8-447A-8BCD-577F45511E7F@dslextreme.com> In-Reply-To: <8327DBDD-1ED8-447A-8BCD-577F45511E7F@dslextreme.com> Subject: RE: Problem with daily rotation on log4j2 RollingFile Date: Fri, 24 Aug 2018 21:43:19 +0200 Organization: Ventus Technologies Message-ID: <000001d43be2$b607d000$22177000$@ventusproxy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGYeVtfKPR54FiVyXXz1KVe97NpRwLMT2fNAfvs8FilIJC4AA== Content-Language: es X-AV-Checked: ClamAV using ClamSMTP Sorry, is the pattern ok or not? Thanks, Joan. -----Mensaje original----- De: Ralph Goers [mailto:ralph.goers@dslextreme.com]=20 Enviado el: viernes, 24 de agosto de 2018 19:24 Para: Log4J Users List Asunto: Re: Problem with daily rotation on log4j2 RollingFile Matt, I don=E2=80=99t see anything wrong with the file pattern. Ralph > On Aug 24, 2018, at 10:18 AM, Matt Sicker wrote: >=20 > I don't think your filePattern value is correct. You should be using=20 > format specifiers from SimpleDateFormat there, not PatternLayout. Or=20 > you could put the date in a $${} to delay expansion it looks like. >=20 > On Fri, 24 Aug 2018 at 11:30, Joan Balaguer=C3=B3 - ventusproxy <=20 > joan.balaguero@ventusproxy.com> wrote: >=20 >> Hello, >>=20 >>=20 >>=20 >> I=E2=80=99m using RollingFileAppender with full async logging. This = is the config: >>=20 >>=20 >>=20 >> >>=20 >> > filePattern=3D"${sys:log.dir}vproxy_access.%d{yyyy-MM-dd}" = append=3D"true" >> immediateFlush=3D"false"> >>=20 >> >>=20 >> %m%d{yyyy-MM-dd HH:mm:ss.SSS}%n >>=20 >> >>=20 >> >>=20 >> >>=20 >> >>=20 >> >>=20 >> >>=20 >>=20 >>=20 >> >>=20 >> >>=20 >> > additivity=3D"false"> >>=20 >> >>=20 >> >>=20 >> >>=20 >>=20 >>=20 >>=20 >>=20 >> I started to send requests the 2018-08-22, the=20 >> vproxy_access.2018-08-22 was correctly created and requests started=20 >> to be logged. These are the first 2 >> lines: >>=20 >> 1,192.168.1.248,2018-08-22 >> 18:11:30.171,A,13,A,40,A,72,A,60,N,,192.168.1.248:80 >> ,gzip,80616,329,2537,202 >> ,ok,2018-08-22 18:11:30.735 >>=20 >> 1,192.168.1.248,2018-08-22 >> 18:11:30.171,A,13,A,39,A,72,A,60,N,,192.168.1.248:80 >> ,gzip,140160,328,4071,45 >> 2,ok,2018-08-22 18:11:30.744 >>=20 >>=20 >>=20 >> Then I stopped to send requests until 2018-08-24 12:25. The point is=20 >> these requests (sent today, day 24) have been logged on the same=20 >> file, 2018-08-22, instead of in a newly created log file 2018-08-24.=20 >> This is the moment (2 lines before, and the first 2 lines today): >>=20 >> 1,192.168.1.248,2018-08-22 >> 18:59:23.415,A,13,A,39,A,72,A,60,N,,192.168.1.248:80 >> ,gzip,28236,329,1212,121 >> ,ok,2018-08-22 18:59:23.537 >>=20 >> 1,192.168.1.248,2018-08-22 >> 18:59:23.537,A,13,A,40,A,72,A,60,N,,167.114.89.182:80 >> ,gzip,51516,329,1802,43 >> 7,ok,2018-08-22 18:59:23.977 >>=20 >> 1,192.168.1.248,2018-08-24 >> 12:25:42.439,A,13,A,39,A,72,A,60,N,,192.168.1.248:80 >> ,gzip,133122,329,3903,18 >> ,ok,2018-08-24 12:25:42.466 >>=20 >> 1,192.168.1.248,2018-08-24 >> 12:25:42.428,A,13,A,40,A,72,A,60,N,,192.168.1.248:80 >> ,gzip,205848,329,5681,30 >> ,ok,2018-08-24 12:25:42.471 >>=20 >>=20 >>=20 >> Today I=E2=80=99ve kept on sending requests, and these are the last 2 = lines: >>=20 >> 1,192.168.1.248,2018-08-24 >> 23:59:58.851,A,13,A,40,A,72,A,60,N,,192.168.1.248:80 >> ,gzip,99240,329,3020,472 >> ,ok,2018-08-24 23:59:59.326 >>=20 >> 1,192.168.1.248,2018-08-24 >> 23:59:59.326,A,13,A,41,A,72,A,60,N,,167.114.89.182:80 >> ,gzip,34056,327,1358,46 >> 7,ok,2018-08-24 23:59:59.795 >>=20 >>=20 >>=20 >> At 00:00 rotation is performed, this is the new log file = (it=E2=80=99s correct): >>=20 >> 1,192.168.1.248,2018-08-24 >> 23:59:59.796,A,13,A,40,A,72,A,60,N,,192.168.1.248:80 >> ,gzip,27072,329,1186,392 >> ,ok,2018-08-25 00:00:00.189 >>=20 >> 1,192.168.1.248,2018-08-25 >> 00:00:00.190,A,13,A,41,A,72,A,60,N,,167.114.89.182:80 >> ,gzip,82944,327,2597,48 >> 7,ok,2018-08-25 00:00:00.680 >>=20 >> 1,192.168.1.248,2018-08-25 >> 00:00:00.681,A,13,A,41,A,72,A,60,N,,192.168.1.248:80 >> ,,2700,326,0,256,ok,2018 >> -08-25 00:00:00.937 >>=20 >>=20 >>=20 >> But the problem is this log file has been created as 2018-08-24=20 >> instead of 2018-08-25. >>=20 >>=20 >>=20 >> These are my 2 log files: >>=20 >> -rw-r-----. 1 root root 4382871 Aug 24 23:59 >> vproxy_access.2018-08-22 >>=20 >> -rw-r-----. 1 root root 16224 Aug 25 00:00 >> vproxy_access.2018-08-24 >>=20 >>=20 >>=20 >> And this is the system date now: >>=20 >> [root@server02 logs]# date >>=20 >> Sat Aug 25 00:17:37 EDT 2018 >>=20 >>=20 >>=20 >>=20 >>=20 >> So at this point I=E2=80=99m not sure if this is a bug or I simply = has=20 >> something misconfigured in my log4j.xml >>=20 >>=20 >>=20 >> Thanks, >>=20 >>=20 >>=20 >> Joan. >>=20 >>=20 >>=20 >>=20 >=20 > -- > Matt Sicker --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org