configuring the logger for every thread (`current.logger = logger`), and this seems unnecessary. Take a look at this logging configuration: https://github.com/web2py/web2py/blob/0d646fa5e7c731cb5c392adf6a885351e77e4903/examples/logging.example.conf, and set one up for your app.

________________________________________
Kiran Subbaraman
http://subbaraman.wordpress.com/about/

On 23-Oct-17 12:02 AM, Ian Ryder wrote:
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 logginglogger_format ='%(asctime)s - %(funcName)s():%(lineno)d [%(levelname)s]: %(message)s'logging.basicConfig(format=logger_format,level=int(session.logging_level)ifsession.logging_level elselogging.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] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
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