I'm working on a python script and I'm using the python logging module for writing some information into a log file (see http://docs.python.org/howto/logging.html).
Here is a small example (also from the mentioned page):
import logging
import logging.config
logging.config.fileConfig('logging.conf')
# create logger
logger = logging.getLogger('simpleExample')
# 'application' code
logger.info('info message')
logger.error('error message')
Now I want to create a c-extension for python, which I want to import in my program.
The question is: How can I write information in my log-file from my c-code? Is there a way of using the logging-module from a python c-extension?
Thank you for any comments!