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_dbi module #954

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

bchoudhary6415
Copy link
Contributor

@bchoudhary6415 bchoudhary6415 commented Jul 2, 2024

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(True)

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

#Stop logging
dbi.debug(False)

Calling dbi.debug(True) with Boolean True argument will output logs to the console.
Calling dbi.debug("log.txt") will log messages to the specified file (log.txt in this example).
Calling dbi.debug(False) with Boolean False argument will stop logging.

Signed-off-by: Balram Choudhary <bchoudhary@rocketsoftware.com>
Signed-off-by: Balram Choudhary <bchoudhary@rocketsoftware.com>
Signed-off-by: Balram Choudhary <bchoudhary@rocketsoftware.com>
@bimalkjha bimalkjha merged commit bbd0e83 into ibmdb:master Jul 3, 2024
7 checks passed
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