Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llRfK-0007n1-Rm for pgadmin-hackers@arkaria.postgresql.org; Tue, 25 May 2021 07:39:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1llRfJ-0006te-Qz for pgadmin-hackers@arkaria.postgresql.org; Tue, 25 May 2021 07:39:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llRfJ-0006tW-FX for pgadmin-hackers@lists.postgresql.org; Tue, 25 May 2021 07:39:49 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1llRfG-0001nA-9B for pgadmin-hackers@postgresql.org; Tue, 25 May 2021 07:39:49 +0000 Received: by mail-io1-xd2e.google.com with SMTP id e17so17997761iol.7 for ; Tue, 25 May 2021 00:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jPUBTXVN7+fuSrj5dXnZ6uCPnzKe5al/6svl/cgfnck=; b=C0T5VmFZ/2/UCIX//1NVvCjm3awCzEyWaiAf8sMaTTnKKK293uw5LZKxDxO0hb4qnI mhpj+XeD5inU8s+I21xicNNEpq66wUpXWk1Tqa+mME4FqKm0ApaBKYaSMjbCR4VPMM6d IaPOyYkePGmHj8KuQ0A7iNRkp9eDrC+y00gsTpT44b4/NPKFlqIFjIsfiwS6DchpryeK 06TZRzjn8AZn2E4YzfMfS2Y+285e4CHeSKq/OaKg69WpAcZMnBh0GZqPZb71WaUe7ofn sgevngtHQFNcvW8fMa53qAaLcV1It6QHpOCmtO/w2iY44FISGqRLoclHeJOzsK8QpzWN ZA6w== 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:cc; bh=jPUBTXVN7+fuSrj5dXnZ6uCPnzKe5al/6svl/cgfnck=; b=CD8glrnBYy23PfVrBvkYJaDCbtBlOThAFRGLSdIcQD0Jem4dqobmglso0aVAq9TmXi nNha3uH2R+DUd3rVCPqJ1EMA69cTeF1LeZUBw6wueV/L0LlbL1gyK2uE9wBosfEafJTh ElEJ9f5VQa1GYSwQK2cuQ/pneUc5XSlC+Rg1HD23O/7kO6iMySE3YDbiwMTY+f5c3A8D fQxx+Am2QQ4GsFFSBwTMn0143RJA2lJzz0Pguotpxt7e2zFaRZZ7s4pN6CBTN7W2Z7Gn N2C3ZCm0D7T/bDZBildl+Bha18c2ziy5L5sf+/Fmo54bR0iFNXUV4ABLIjuHlOv94EbT xmYw== X-Gm-Message-State: AOAM530ppCdCdfNzgSfuiyWfnSJKhaNRKcFF0UC6/kOhCYYAK0RiIuKX DuoZ3AfuPEj4sLdAWpbdUf9qusgE860G0XZckXkgeSMz/ldrNZv3TFEuA93lB8+40NsqEDG19T7 kZ6UMMgEvlVuLoghMKzOxdWSPCxFjOoqWQJtkrIvcpSM0LCSgh23esbv5HiXBb5X71tXmjVbPzH dmP3zce+MR4a5ng3mg0xqhWr/TsWbyWN9EkoXHciV0K7lCsa/Zm+kef7ismkh+zi11HA== X-Google-Smtp-Source: ABdhPJwzSdT75Gq1QEHKTrAH1zDP14P75QFN7A8YVz5R6ivwEvvpRAuDVw2YZ/5MhaNPR/2DJqqYZp71sWvAwVetvSo= X-Received: by 2002:a6b:b409:: with SMTP id d9mr18002134iof.57.1621928384069; Tue, 25 May 2021 00:39:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Tue, 25 May 2021 13:09:33 +0530 Message-ID: Subject: Re: [pgAdmin][Patch] - Feature #6395 - Feature request: Log Rotation To: Yogesh Mahajan Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000002f1e3a05c322a14f" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002f1e3a05c322a14f Content-Type: text/plain; charset="UTF-8" Hi Yogesh Following are the review comments: - LOG_ROTATION_MAX_LOGS should be renamed to LOG_ROTATION_MAX_LOG_FILES - Rollover file name should have '.log' extension at the end instead of " pgadmin4.log.2021-05-25_12-17-43" - Add comments in the 'enhanced_log_rotation.py' file. - 'enhanced_log_rotation.py' file line no 23 should be "max_bytes = max_bytes * 1024 * 1024" instead of "max_bytes = max_bytes * 1000000" On Tue, May 25, 2021 at 10:54 AM Yogesh Mahajan < yogesh.mahajan@enterprisedb.com> wrote: > Hi, > > Please find the attached patch which rotates the pgadmin log file with > context to the parameters specified in the config file. > > # Log rotation setting > LOG_ROTATION_SIZE = 10 # In MBs > LOG_ROTATION_AGE = 1440 # In minutes > LOG_ROTATION_MAX_LOGS = 90 # Maximum number of backups to retain > > > Thanks, > Yogesh Mahajan > EnterpriseDB > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Principal Software Architect* *EDB Postgres * *Mobile: +91 976-788-8246* --0000000000002f1e3a05c322a14f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Yogesh

Following are the review= comments:
  • LOG_ROTATION_MAX_LOGS should be renamed to LOG_ROTATION_MAX_LOG_FILES
  • Rollover file name should have '.log' extension at t= he end instead of "pgadmin4.log.2021-05-25_12-17-43"= ;
  • Add comments in the 'enhanced_log_rotation.py' file.
  • =
  • =C2=A0'enhanced_log_rotation.py' file line no 23 should=C2=A0be= "max_bytes =3D max_bytes * 1024 * 1024" inste= ad of "max_bytes =3D max_bytes * 1000000"
    <= /li>

On Tue, May 25, 2021 at 10:54 AM Yogesh Mahajan <yogesh.mahaja= n@enterprisedb.com> wrote:
Hi,

Ple= ase find the attached patch which rotates the pgadmin log file with context= to the parameters specified in the config file.

# Log rotation= setting
LOG_ROTATION_SIZE =3D 10 # In M= Bs
LOG_ROTATION_AGE =3D 1440 = # In minute= s
LOG_ROTATION_MAX_LOGS =3D 90= # Maximum= number of backups to retain

Thanks,
Yogesh Maha= jan
EnterpriseDB


--
Thank= s & Regards
Akshay Joshi
pgAdmin Hacker | Principal Softw= are Architect
EDB Po= stgres
Mobile: +91 976-788-8246

--0000000000002f1e3a05c322a14f--