Re: Integrating C++ singletons into postgresql extensions???

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Woodbridge <woodbri(at)swoodbridge(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Integrating C++ singletons into postgresql extensions???
Date: 2014-10-18 15:19:25
Message-ID: 19294.1413645565@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephen Woodbridge <woodbri(at)swoodbridge(dot)com> writes:
> On 10/18/2014 5:38 AM, Andres Freund wrote:
>>> 3. What do for logging classes when integrating C++ code into postgresql?

>> I don't really know what you want to do here. My guess is that it'd be
>> most appropriate to map the logging onto postgres' internal
>> logging. That should easily be possible.

> Ahh, sorry this is just debug info that we write to stdout when we are
> testing and debug the code from the command line. There are some
> packages like log4cpp and log4cxx that provide objects that can be
> easily configure to change the output stream from stdout to a log file
> or turn it off completely.

FWIW, if you are using the logging collector (highly recommended), output
to a backend process's stdout or stderr will be caught and included in the
log, though it won't have a log_line_prefix. This might be a usable
substitute for adapting your code.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-10-18 15:34:18 Re: Row number estimation...
Previous Message Stephen Woodbridge 2014-10-18 13:39:11 Re: Integrating C++ singletons into postgresql extensions???