Skip to content

Commit

Permalink
Support for logging in ibm_db_dbi module
Browse files Browse the repository at this point in the history
Signed-off-by: Balram Choudhary <[email protected]>
  • Loading branch information
bchoudhary6415 committed Jul 2, 2024
1 parent f29f531 commit 7dcc412
Show file tree
Hide file tree
Showing 2 changed files with 419 additions and 44 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,26 @@ True
True
```

## Logging

### Logging in ibm_db_dbi Module
You can enable logging in the ibm_db_dbi module to debug and trace activities.
Logging can be directed to the console or a specified file.

To enable logging:
```
import ibm_db_dbi as dbi

# Log to console
dbi.debug()

# Log to a file (e.g., log.txt)
dbi.debug("log.txt")
```
Calling dbi.debug() without arguments will output logs to the console.
Calling dbi.debug("log.txt") will log messages to the specified file (log.txt in this example).
## Example of SSL Connection String
* **Secure Database Connection using SSL/TSL** - ibm_db supports secure connection to Database Server over SSL same as ODBC/CLI driver. If you have SSL Certificate from server or an CA signed certificate, just use it in connection string as below:
Expand Down
Loading

0 comments on commit 7dcc412

Please sign in to comment.