[unixODBC-dev] Timestamp in the unixODBC log file

Nick Gorham nick at lurcher.org
Thu May 11 13:15:34 BST 2006


anand.vasudevan at wipro.com wrote:
> Hi all,
> 
> I have the following entry in my odbcinst.ini file: -
> 
> [ODBC]
> Trace           = Yes
> TraceFile               = /tmp/sql.log
> ForceTrace              = Yes
> Pooling         = Yes
> 
> 
> I get the following log messages in the /tmp/sql.log file: -
> 
> [ODBC][23545][SQLAllocHandle.c][463]
>                 Exit:[SQL_SUCCESS]
>                         Output Handle = 11c340
> [ODBC][23545][SQLSetConnectAttr.c][318]
>                 Entry:
>                         Connection = 11c340
>                         Attribute = SQL_ATTR_LOGIN_TIMEOUT
>                         Value = 5
>                         StrLen = 0
> [ODBC][23545][SQLSetConnectAttr.c][500]
>                 Exit:[SQL_SUCCESS]
> [ODBC][23545][SQLConnect.c][3549]
>                 Entry:
>                         Connection = 11c340
>                         Server Name = [testdb][length = 14 (SQL_NTS)]
>                         User Name = [usr][length = 6 (SQL_NTS)]
>                         Authentication = [******][length = 6 (SQL_NTS)]
> [ODBC][23545][SQLConnect.c][3758]Error: IM002
> 
> 
> Is there a way I can get timestamp in this file for each line of log
> statement?

Just add it to the dm_log_write* functions in DriverManager/__info.c

-- 
Nick Gorham
Easysoft Limited



More information about the unixODBC-dev mailing list