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 1llYNX-0007RF-A6 for pgadmin-hackers@arkaria.postgresql.org; Tue, 25 May 2021 14:49:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1llYNW-0004sx-7B for pgadmin-hackers@arkaria.postgresql.org; Tue, 25 May 2021 14:49:54 +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 1llYNV-0004rr-TU for pgadmin-hackers@lists.postgresql.org; Tue, 25 May 2021 14:49:54 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1llYNT-0005Jp-Gk for pgadmin-hackers@postgresql.org; Tue, 25 May 2021 14:49:53 +0000 Received: by mail-io1-xd36.google.com with SMTP id k16so31798426ios.10 for ; Tue, 25 May 2021 07:49:51 -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=ySopOrMv8gfoI6XJpJ1l3jJt16uxROhP7Yonzw9oypY=; b=IrugUWVULXP5BAO5nKBmOcMn7fyzW+b5tA7w5hrA5W3+00mC1CFuYYObiGSViEYqRT 8fUaz64hpy7ijayetJeBwYCPzEuY/wC+vnMoZMzD/XT36KL7oB7o9J8SUvet2Eld1bxR xunz+rB2lsbHhK2VSfn1pU5JcgKIwOB5Ek1nUUaHFkzAGDpkac6AN0Q8XVZJ0bZRlER4 AKQihQ2fXPyYdSBGTn4chSiBYoGlmNNRGXDOYECnh/sIhmYfeZaR9Q+hH3jsdHcfvx4I HAXBYJGkTb2fBr5qJiXjHemkldyvi9Lt+HoHBX/xmndyOPfeFSmyDr/NGYc93eTGHSRI PYhw== 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=ySopOrMv8gfoI6XJpJ1l3jJt16uxROhP7Yonzw9oypY=; b=RhVeFSd/ySSuEoIIBBvuTFx3Q/oPUTp8Jwx2zQjYVAIq4eFZi2Ya0zSqB9J+Db9+KF H1eV1bShOjI/7Ob9Pf9RdzmqJBKA+VQjsyQt2Lfe7ehhw/d03ihBhR9PGUJ2lE1dcYnp RgrT+DiIpch+rzgy4a2Xl6tCG+sbvHc5u6pBYS3DBHKG3Nm4fc8yNs2dChr22Z7QgeBZ NdDZue/DeIsfF2Ce8N2PzTyuTBTk8cjMOpSoKiAwjdVO9PwMg+Qp8MznqP7xXNCF4Iks QBC5AqqH7QZZePsDwU7KIkgHFHVmA8ry6blfOlQj0NSmcTqOYMJY+ahDizhQmMc385tP mCMQ== X-Gm-Message-State: AOAM531eovrqnWBtLyuCKldZsZ1rW8omTX/Gx+xKQnkEo2ZzQUqjFlwO 4XfU5DVsaiZDRJIeGe9rIe4PbyWrNAzGAVDW0xz3uSovsGprLo6Ui0WcJbIN3ZX2JZFtv0VYYaQ 2tImCQrQOIUfoGzBHFnrPsS3GJlzXRw6GVE5kgnsc+Dex8ECjIn8IFU02MDLubL82POEcPG6xDE yHV0nW0LkiQTPbRDKpuTrGfMTV9w+e+WWzWAonGbQP8SH2e0YyYZv8VzCxBQ== X-Google-Smtp-Source: ABdhPJwUnFV3fzU1/Cmiz08Y2EKsRZoUHf3uMqnEnuUxKBHkrURZo+mJyTN62kDHvc18doXDK/LHlxkw6rR1H7IefDk= X-Received: by 2002:a05:6638:963:: with SMTP id o3mr33370895jaj.0.1621954189592; Tue, 25 May 2021 07:49:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Tue, 25 May 2021 20:19:38 +0530 Message-ID: Subject: Re: [pgAdmin][Patch] - Feature #6395 - Feature request: Log Rotation To: Yogesh Mahajan Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000005020f805c328a38d" 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 --0000000000005020f805c328a38d Content-Type: text/plain; charset="UTF-8" Thanks, patch applied. On Tue, May 25, 2021 at 4:59 PM Yogesh Mahajan < yogesh.mahajan@enterprisedb.com> wrote: > Hello, > > Please find the attached file incorporated with the above comments except > the 2nd one. > > Thanks, > Yogesh Mahajan > EnterpriseDB > > > On Tue, May 25, 2021 at 1:09 PM Akshay Joshi < > akshay.joshi@enterprisedb.com> wrote: > >> 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* >> > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Principal Software Architect* *EDB Postgres * *Mobile: +91 976-788-8246* --0000000000005020f805c328a38d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, patch applied.

On Tue, May 25, 2021 at 4:59 PM Yoge= sh Mahajan <yogesh.ma= hajan@enterprisedb.com> wrote:
Hello,

Please find the attached file incorporated with the a= bove comments except the 2nd one.

Thanks,=
Yogesh Mahajan
EnterpriseDB


On Tue, May 25, 2021 at 1:09 PM Akshay Joshi <akshay.joshi@enterprisedb.= com> wrote:
Hi=C2=A0Yogesh

Following are the rev= iew comments:
  • LOG_ROTATION_MAX_LOGS should= be renamed to LOG_ROTATION_MAX_LOG_FILES
  • Rollover file name should have '.log' extension a= t the end instead of "pgadmin4.log.2021-05-25_12-17-43&q= uot;
  • 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" = instead of "max_bytes =3D max_bytes * 1000000"=

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

Please find the attached patch which rotates the pgadmin log file with con= text to the parameters specified in the config file.

# Log rota=
tion setting
LOG_ROTATION_SIZE =3D 10 # = In MBs
LOG_ROTATION_AGE =3D 14= 40 # In mi= nutes
LOG_ROTATION_MAX_LOGS =3D 90 # Max= imum number of backups to retain
Thanks,
Yogesh = Mahajan
EnterpriseDB


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



--
Thanks & Regards
Akshay Joshi
pgAdmi= n Hacker | Principal Software Architect
EDB Postgres
Mobile: +91 976-788-8246

--0000000000005020f805c328a38d--