Skip to content

Commit

Permalink
Support for logging in ibm_db module
Browse files Browse the repository at this point in the history
Signed-off-by: Balram Choudhary <[email protected]>
  • Loading branch information
bchoudhary6415 committed Oct 4, 2024
1 parent d32e2ea commit 918665f
Show file tree
Hide file tree
Showing 3 changed files with 3,470 additions and 334 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,29 @@ True

## Logging

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

To enable logging:
```
import ibm_db

# Log to console
ibm_db.debug(True)

# Log to a file (e.g., log.txt)
ibm_db.debug("log.txt")

# stop logging
ibm_db.debug(False)
```
Calling ibm_db.debug(True) with boolean True argument will output logs to the console.
Calling ibm_db.debug("log.txt") will log messages to the specified file (log.txt in this example).
Calling ibm_db.debug(False) with boolean False argument will stop 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.
Expand Down
Loading

0 comments on commit 918665f

Please sign in to comment.