<div dir="ltr"><div>Hi Paul and hi Sandro,</div><div><br></div><div>Thanks for your reply!</div><div><br></div><div>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!</div><div><br></div><div>Best,</div><div>Han</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 15, 2021 at 6:01 AM Sandro Santilli <<a href="mailto:strk@kbt.io">strk@kbt.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Jun 14, 2021 at 09:41:21PM +0800, Han Wang wrote:<br>
> Hi Giuseppe,<br>
> <br>
> Please forgive me if I was unclear.<br>
> <br>
> I call `POSTGIS_DEBUG` in some functions to debug but when I run .sql test<br>
> script in /regress folder, I did not see any output related to the debug<br>
> information. Besides, I have already set the `*POSTGIS_DEBUG_LEVEL*` to *1*.<br>
<br>
1) Did you add this to your sql :<br>
<br>
   set client_min_messages to DEBUG;<br>
<br>
2) How did you set POSTGIS_DEBUG_LEVEL ?<br>
<br>
   The build scripts are not very robust so you you're doing<br>
   this globally you may need to do a clean build.<br>
<br>
I saw there's a postgis/DEBUG file which mentions the need for<br>
a rebuild, if you find anything useful which is missing there<br>
feel free to add it.<br>
<br>
What I often do rather than setting the debug macro globally<br>
is I redefined that in the .c file, making sure to do so<br>
after postgis_config.h is included and before lwgeom_log.h<br>
is included. You will find a commented-out such definition<br>
in some files, for example in topology/postgis_topology.c<br>
<br>
--strk;<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
</blockquote></div>