Reputation: 6456
I have installed some ODBC drivers in Mac OS X. One of them works incorrectly, i.e. my app cannot connect to PostgreSQL database via the ODBC driver. I'd like to enable logging for it and check what is the reason.
How I can do it?
Upvotes: 1
Views: 946
Reputation: 9434
If you were using the iODBC driver manager that ships with macOS, tracing would be controlled through the iODBC Administrator.app
, found in /Applications/iODBC/
, and the standard configuration file (odbc.ini
) found in the standard locations (/Library/ODBC/
for system-level config; /Users/*/Library/ODBC/
for user-level).
You can also manually edit (or create) a stanza like the one below in that file.
[ODBC]
Trace = 1
TraceFile = iodbc.$U.$p.$T.log
TraceAutoStop = 0
;TraceDLL =
Note the $u
, $p
, $t
, and/or $h
tokens may be used to automatically insert UserID, ProcessID, Timestamp, and/or $HOME in the log filename.
With UnixODBC as an after-market, third-party add-on, the configuration files may be located anywhere. UnixODBC tracing is enabled/disabled via this stanza of the odbcinst.ini
(not odbc.ini
) file.
[ODBC]
Trace = yes
TraceFile = trace_file_path
Upvotes: 3