Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for logging in ibm_db module #964

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

bchoudhary6415
Copy link
Contributor

This PR is regarding 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.

@bimalkjha bimalkjha merged commit 72703f4 into ibmdb:master Oct 4, 2024
7 checks passed
@bchoudhary6415 bchoudhary6415 deleted the ibmdb_logging branch October 8, 2024 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants