[PROJ] PROJ without proj.db
Kristian Evers
kristianevers at gmail.com
Wed Mar 10 00:22:32 PST 2021
Sorry, I completely misread that. Well, I guess my analysis is still valid
although it doesn’t solve your problem :-)
I am not sure what’s going on then. Which version are you using?
/Kristian
> On 10 Mar 2021, at 09:18, Søren Holm <sgh at sgh.dk> wrote:
>
> The function pointer is the third argument. I do indeed set the log function.
>
> onsdag den 10. marts 2021 09.14.34 CET skrev Kristian Evers:
>> Here’s the source proj_log_func():
>>
>> /***************************************************************************
>> **/ void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION
>> logf) {
>> /**************************************************************************
>> **** Put a new logging function into P's context. The opaque object app_data
>> is passed as first arg at each call to the logger
>> ****************************************************************************
>> **/ if (nullptr==ctx)
>> ctx = pj_get_default_ctx ();
>> ctx->logger_app_data = app_data;
>> if (nullptr!=logf)
>> ctx->logger = logf;
>> }
>>
>> So, by putting nullptr as the log function you end up with the default
>> logging function. Try setting up an actual logger function and pass a
>> pointer to that.
>>
>> I can see how you might think that a null pointer would achieve something
>> else, though. The docs should clarify that or perhaps the functionality
>> should be changed to let logf==nullptr explicitly mean “shut up”. The
>> latter is likely the best move based on the fact that if you are happy with
>> the default logger you probably wouldn’t call proj_log_func() in the first
>> place.
>>
>
> --
> Søren Holm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20210310/8ca9d0dc/attachment.html>
More information about the PROJ
mailing list