[unixODBC-support] driver logging

Nick Gorham nick.gorham at easysoft.com
Tue Mar 1 20:49:14 GMT 2005


Eric Sharkey wrote:

>>>Most do.  For those that don't I think it's better to provide an
>>>implementation rather than not use these functions.  This is what we
>>>do for our database.
>>> 
>>>
>>>      
>>>
>>Ok, but I have to ask what "problem" this change would fix?
>>    
>>
>
>Performance.
>
>I haven't profiled it yet, but having all these sprintfs makes me
>itchy.  If the sprintf is moved into logPushMsg, and only done
>if logging is enabled, then it's not an issue in a production
>environment, where logging is usually turned off.
>
>Maybe it's the nature of working with RAM based datasources,
>where data access is usually quick.  Little bits of overhead like this
>can add up really quickly, relative to the actual work that needs to
>get done.
>  
>

the start of dm_log_write contains

    if ( !log_info.log_flag && !ODBCSharedTraceFlag )
        return;

So if logging is off there is no call to sprintf.

-- 
Nick



More information about the unixODBC-support mailing list