[postgis-devel] Questions about POSTGIS_DEBUG

Han Wang hanwgeek at gmail.com
Tue Jun 15 06:49:23 PDT 2021


Hi Paul and hi Sandro,

Thanks for your reply!

The `elog()` seems to work. Because of different log levels like `NOTICE`
or `WARNING`, the log will not to send to server. And as Sandro said, I did
not set client_min_messages explicitly, but now I set elog level to
`NOTICE` and I can see some information in the regress test output. It
basically works. Thank both of you for your help!

Best,
Han

On Tue, Jun 15, 2021 at 6:01 AM Sandro Santilli <strk at kbt.io> wrote:

> On Mon, Jun 14, 2021 at 09:41:21PM +0800, Han Wang wrote:
> > Hi Giuseppe,
> >
> > Please forgive me if I was unclear.
> >
> > I call `POSTGIS_DEBUG` in some functions to debug but when I run .sql
> test
> > script in /regress folder, I did not see any output related to the debug
> > information. Besides, I have already set the `*POSTGIS_DEBUG_LEVEL*` to
> *1*.
>
> 1) Did you add this to your sql :
>
>    set client_min_messages to DEBUG;
>
> 2) How did you set POSTGIS_DEBUG_LEVEL ?
>
>    The build scripts are not very robust so you you're doing
>    this globally you may need to do a clean build.
>
> I saw there's a postgis/DEBUG file which mentions the need for
> a rebuild, if you find anything useful which is missing there
> feel free to add it.
>
> What I often do rather than setting the debug macro globally
> is I redefined that in the .c file, making sure to do so
> after postgis_config.h is included and before lwgeom_log.h
> is included. You will find a commented-out such definition
> in some files, for example in topology/postgis_topology.c
>
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20210615/3f014887/attachment.html>


More information about the postgis-devel mailing list