Hi, we're just getting logging running on an app we're building and have a 
what I hope is a bit of noob issue.

It seems every time a request comes in a new file handle is opened and not 
released when the request is finished. Eventually we get an error with too 
many open files and everything stops working.

Are we missing something simple? There doesn't seem to be anyone else 
having such an issue so hopefully we're doing something wrong. The logger 
initialisation looks like this:

# configure logging
logger_format = '%(asctime)s - %(funcName)s():%(lineno)d [%(levelname)s]: 
%(message)s'
logging.basicConfig(
    format=logger_format,
    level=int(session.logging_level) if session.logging_level else logging.INFO
)
logger = logging.getLogger(cfg.global_app_name)
handler = logging.FileHandler('test.log')
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
current.logger = logger


Thanks

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to