Thread: Please add timestamps to pgagent log
Request: pgagent's output log current does not include timestamps. That makes it fairly hard to debug anything based on the log. Can we add a timestamp to the beginning of each log line? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
Sanket - can you look at this please? As with Josh's request for --version, it looks like we added this functionality to the PEM agent, not pgAgent. You may copy the timestamp support for logging from the PEM code to save effort. On Sat, Jul 4, 2015 at 7:23 PM, Josh Berkus <josh@agliodbs.com> wrote: > Request: > > pgagent's output log current does not include timestamps. That makes it > fairly hard to debug anything based on the log. Can we add a timestamp > to the beginning of each log line? > > -- > Josh Berkus > PostgreSQL Experts Inc. > http://pgexperts.com > > > -- > Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-support -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Sure Dave,
I will look into it.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
On Fri, Jul 10, 2015 at 7:40 PM, Dave Page <dpage@pgadmin.org> wrote:
Sanket - can you look at this please? As with Josh's request for
--version, it looks like we added this functionality to the PEM agent,
not pgAgent. You may copy the timestamp support for logging from the
PEM code to save effort.--
On Sat, Jul 4, 2015 at 7:23 PM, Josh Berkus <josh@agliodbs.com> wrote:
> Request:
>
> pgagent's output log current does not include timestamps. That makes it
> fairly hard to debug anything based on the log. Can we add a timestamp
> to the beginning of each log line?
>
> --
> Josh Berkus
> PostgreSQL Experts Inc.
> http://pgexperts.com
>
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Hi ,
I have attached the patch which is having both functionalities (-v for version info and timestamp in log)Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
On Fri, Jul 10, 2015 at 8:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Sure Dave,I will look into it.Regards,Sanket MehtaSr Software engineerEnterprisedbOn Fri, Jul 10, 2015 at 7:40 PM, Dave Page <dpage@pgadmin.org> wrote:Sanket - can you look at this please? As with Josh's request for
--version, it looks like we added this functionality to the PEM agent,
not pgAgent. You may copy the timestamp support for logging from the
PEM code to save effort.--
On Sat, Jul 4, 2015 at 7:23 PM, Josh Berkus <josh@agliodbs.com> wrote:
> Request:
>
> pgagent's output log current does not include timestamps. That makes it
> fairly hard to debug anything based on the log. Can we add a timestamp
> to the beginning of each log line?
>
> --
> Josh Berkus
> PostgreSQL Experts Inc.
> http://pgexperts.com
>
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment
HI On Mon, Jul 13, 2015 at 1:59 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote: > Hi , > > I have attached the patch which is having both functionalities (-v for > version info and timestamp in log) > > Here timestamp is added only for linux platform because on windows pgagent > logs are viewed in event viewer which provides timestamp on its own. OK > Please do review it and let me know in case anything is missing. Can we not get the version from a preprocessor macro? It's already in CMakeLists.txt after all. If not, I think we at least need to update the comment in CMakeLists.txt and other files as appropriate so we don't forget to update the number anywhere. Also, please change: shows version then exit to display version info and then exit. Thanks! -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi Dave,
I have created a new patch with changes you have suggested.
Please find it attached with this mail.
Please do review it.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
On Mon, Jul 13, 2015 at 7:06 PM, Dave Page <dpage@pgadmin.org> wrote:
HI
On Mon, Jul 13, 2015 at 1:59 PM, Sanket Mehta
<sanket.mehta@enterprisedb.com> wrote:
> Hi ,
>
> I have attached the patch which is having both functionalities (-v for
> version info and timestamp in log)
>
> Here timestamp is added only for linux platform because on windows pgagent
> logs are viewed in event viewer which provides timestamp on its own.
OK
> Please do review it and let me know in case anything is missing.
Can we not get the version from a preprocessor macro? It's already in
CMakeLists.txt after all. If not, I think we at least need to update
the comment in CMakeLists.txt and other files as appropriate so we
don't forget to update the number anywhere.
Also, please change:
shows version then exit
to
display version info and then exit.
Thanks!
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment
Hi On Thu, Jul 16, 2015 at 8:19 AM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote: > Hi Dave, > > I have created a new patch with changes you have suggested. > Please find it attached with this mail. > > Please do review it. Doesn't the following break the schema version check in pgAgent.cpp? ADD_DEFINITIONS(-DPGAGENT_VERSION_MAJOR=${CPACK_PACKAGE_VERSION_MAJOR}) +ADD_DEFINITIONS(-DPGAGENT_VERSION="${VERSION}") -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi Dave,
On Thu, Jul 16, 2015 at 5:56 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi
On Thu, Jul 16, 2015 at 8:19 AM, Sanket Mehta
<sanket.mehta@enterprisedb.com> wrote:
> Hi Dave,
>
> I have created a new patch with changes you have suggested.
> Please find it attached with this mail.
>
> Please do review it.
Doesn't the following break the schema version check in pgAgent.cpp?
ADD_DEFINITIONS(-DPGAGENT_VERSION_MAJOR=${CPACK_PACKAGE_VERSION_MAJOR})
+ADD_DEFINITIONS(-DPGAGENT_VERSION="${VERSION}")
No Dave it does not breaking the schema version check in pgAgent.cpp.
I have tested it.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Thu, Jul 16, 2015 at 1:44 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote: > Hi Dave, > > > On Thu, Jul 16, 2015 at 5:56 PM, Dave Page <dpage@pgadmin.org> wrote: >> >> Hi >> >> On Thu, Jul 16, 2015 at 8:19 AM, Sanket Mehta >> <sanket.mehta@enterprisedb.com> wrote: >> > Hi Dave, >> > >> > I have created a new patch with changes you have suggested. >> > Please find it attached with this mail. >> > >> > Please do review it. >> >> Doesn't the following break the schema version check in pgAgent.cpp? >> >> >> ADD_DEFINITIONS(-DPGAGENT_VERSION_MAJOR=${CPACK_PACKAGE_VERSION_MAJOR}) >> +ADD_DEFINITIONS(-DPGAGENT_VERSION="${VERSION}") > > > No Dave it does not breaking the schema version check in pgAgent.cpp. > I have tested it. Oh, sorry - misread the diff. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company