pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arthur Zakirov <a.zakirov@postgrespro.ru>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Donald Dong <xdong@csumb.edu>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Unified logging system for command-line programs
Date: Wed, 13 Mar 2019 14:36:00 +0300
Message-ID: <4a27d368-ea8d-f33e-5f2c-5469c4b5eeff@postgrespro.ru> (raw)
In-Reply-To: <c369a25e-ec9f-3b96-e765-75dd3a63e4c5@2ndquadrant.com>
References: <6a609b43-4f57-7348-6480-bd022f924310@2ndquadrant.com>
	<21141.1546199123@sss.pgh.pa.us>
	<20181231155557.7mokxwg7fnvoxd4a@alap3.anarazel.de>
	<841dd9fb-3550-dce0-e9ff-8f64cac9f15d@2ndquadrant.com>
	<20190103180315.o4gh3id5quh5aebc@alap3.anarazel.de>
	<a7c07b9c-8aa4-f9bb-e9eb-30111b732645@2ndquadrant.com>
	<6174.1546549274@sss.pgh.pa.us>
	<d6e0e58c-e103-c287-b410-2c872067e020@2ndquadrant.com>
	<4159.1546553023@sss.pgh.pa.us>
	<20190103220801.pi234uthwjguwrt3@alap3.anarazel.de>
	<38A737AF-9C4E-483F-B8DD-7B5E718B66C8@csumb.edu>
	<b8238aca-6987-5ee8-dab3-2b3a7bfb1e6b@2ndquadrant.com>
	<5BE33A5D-8B32-43E0-97C6-C30FC7AF9207@csumb.edu>
	<c369a25e-ec9f-3b96-e765-75dd3a63e4c5@2ndquadrant.com>

Hello,

On 22.02.2019 11:39, Peter Eisentraut wrote:
> Here is an updated patch.  I've finished the functionality to the point
> where I'm content with it.  I fixed up some of the remaining special
> cases in pg_dump that I hadn't sorted out last time.  I also moved the
> scattered setvbuf(stderr, ...) handling (for Windows) into a central
> place.  Colors can now be configured, too.
I played with the patch and with coloring of an output. It works neat. 
On thing I noticed that some messages may have double log level. For 
example:

$ psql test
psql: fatal: FATAL:  database "test" does not exist

It is becase psql appends its own level and appends the message from a 
server (including servers log level). I don't think that it is nasty, 
but it may confuse someone. Notice that without the patch the output is:

$ psql test
psql: FATAL:  database "test" does not exist

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company




view thread (27+ messages)  latest in thread

Message-ID: <4a27d368-ea8d-f33e-5f2c-5469c4b5eeff@postgrespro.ru>
Permalink:  ../4a27d368-ea8d-f33e-5f2c-5469c4b5eeff@postgrespro.ru/
Also on:    postgresql.org/message-id/4a27d368-ea8d-f33e-5f2c-5469c4b5eeff@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.zakirov@postgrespro.ru, peter.eisentraut@2ndquadrant.com, xdong@csumb.edu, andres@anarazel.de, tgl@sss.pgh.pa.us
  Subject: Re: Unified logging system for command-line programs
  In-Reply-To: <4a27d368-ea8d-f33e-5f2c-5469c4b5eeff@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox