Skip to content

added section for using Python logging module #1

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

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

nnathan
Copy link
Contributor

@nnathan nnathan commented Jun 8, 2015

I really like the Python extension pattern docs. This is something I together to demonstrate how to log in an extension.

It is missing a few things:

  1. Using logging module as a library requires adding a NullHandler to the logger object incase the application has yet been configured for logging.
  2. A logging function which can use python parsed strings and objects for logging in Python aspects (instead of just C).

This logging system has been implemented here.

The documentation is in draft mode and I haven't actually been able to verify the output in a browser yet, but I created the PR first to see if this is something you may want to include, and if you had any thoughts on how I could improve it.

@nnathan
Copy link
Contributor Author

nnathan commented Jun 21, 2015

Bump. Just seeing if you had a chance to see this yet.

@@ -16,6 +16,7 @@ This describes reliable patterns of coding Python Extensions in C. It covers the
canonical_function
parsing_arguments
module_globals
logging
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -16,6 +16,7 @@ This describes reliable patterns of coding Python Extensions in C. It covers the
canonical_function
parsing_arguments
module_globals
logging
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#19

Copy link
Owner

@paulross paulross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks. I know that this has been a long time!

@paulross paulross merged commit 6e2bb51 into paulross:master Jul 24, 2024
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