On Nov 26, 2010, at 10:44 AM, Wikus van de Merwe wrote:
> 
> On Nov 19, 4:18 pm, Luci3n <[email protected]> wrote:
>> I've set my routes logging to be false, but on app engine every call
>> about 10 / 15 debug logs are written, how can a switch them off.
>> Here's my routes.py
> 
> Your routes.py is not relevant here. Just this one line:
>> routes_logging = False
> 
> I've tried setting it to all possible values and there is no
> difference (web2py 1.89.5) for me on GAE. So I looked at the code of /
> gluon/rewrite.py and there is a logger defined like this:
> logger = logging.getLogger('web2py.rewrite')
> 
> And the definition of this logger can be found in /
> logging.example.conf:
> [logger_rewrite]
> level=WARNING
> qualname=web2py.rewrite
> handlers=consoleHandler
> propagate=0
> 
> Now, what is the connection between the routes_logging and the
> web2py.rewrite logger level? I believe the link is missing as
> routes_logging is not used in /gluon/rewrite.py to set the level of
> the logger and this is why it makes no difference. Can somebody
> (Jonathan?) explain how this was intended to work? Is really the level
> setting code missing here?

routes_logging is not used; it's left over from a previous version and should 
be deleted.

Copy logging.example.conf to logging.conf. That should turn off all your debug 
logs, since they're lower priority than WARNING.

I'm not sure why you're logging at the debug level, unless that's the way the 
GAE installation defaults. Notice that if there's no logging.conf, we rely on 
logging.basicConfig() for initialization (see main.py). Perhaps we should add 
level=logging.WARNING or the like to the basicConfig() call (you might 
experiment with that before you install logging.conf and see what happens; it 
might make a good patch).

Reply via email to