[Pywps-dev] Deactivate sqlalchemy logging

Sylvain Beorchia sylvain.beorchia at gmail.com
Fri Dec 23 14:06:36 PST 2016


Hi Jachym,

Mmm not sure to well understand.
According to the doc, level=INFO is the default.
In dblog.py, we have :

...
level = configuration.get_config_value('logging', 'level')
if level in ['INFO']:
    echo = False
try:
    engine = sqlalchemy.create_engine(database, echo=echo)
...

If we set level = INFO (which is default), log shouldn't be activated. I
don't understand.
Anyway, i've tried the force the setting to INFO:

[logging]
level=INFO

 and no luck. I still have got lots of logs.


I'm going to try to debug that.

Sylvain.



2016-12-23 16:53 GMT+01:00 Jáchym Čepický <jachym.cepicky at gmail.com>:

> Hi,
>
> sorry for later response
>
> in PyWPS configuration file, you can set log level to anything but INFO -
> in that case, in dblog.py
>
> 172   engine = sqlalchemy.create_engine(database, echo=echo_level)
>
> echo_level will be set to False
>
> See
>
> http://pywps.readthedocs.io/en/latest/configuration.html#logging
>
> for how to set this in configuration file
>
> Is that ok?
>
> Jachym
>
> Dne 16.12.2016 v 09:41 Sylvain Beorchia napsal(a):
>
>> Hi all,
>>
>> Using my firsts pywps processes, i've got plenty of unwanted logs. Here's
>> an extract :
>>
>> ...
>> [Fri Dec 16 09:34:36.637934 2016] [:error] [pid 27598]
>> INFO:sqlalchemy.engine.base.Engine:
>> [Fri Dec 16 09:34:36.637937 2016] [:error] [pid 27598] CREATE TABLE
>> pywps_stored_requests (
>> [Fri Dec 16 09:34:36.637938 2016] [:error] [pid 27598] \tuuid VARCHAR(255)
>> NOT NULL,
>> [Fri Dec 16 09:34:36.637940 2016] [:error] [pid 27598] \trequest BLOB NOT
>> NULL,
>> [Fri Dec 16 09:34:36.637942 2016] [:error] [pid 27598] \tPRIMARY KEY
>> (uuid)
>> [Fri Dec 16 09:34:36.637944 2016] [:error] [pid 27598] )
>> [Fri Dec 16 09:34:36.637946 2016] [:error] [pid 27598]
>> [Fri Dec 16 09:34:36.637947 2016] [:error] [pid 27598]
>> [Fri Dec 16 09:34:36.637998 2016] [:error] [pid 27598] 2016-12-16
>> 09:34:36,637 INFO sqlalchemy.engine.base.Engine ()
>> [Fri Dec 16 09:34:36.638017 2016] [:error] [pid 27598]
>> INFO:sqlalchemy.engine.base.Engine:()
>> [Fri Dec 16 09:34:36.638229 2016] [:error] [pid 27598] 2016
>> ...
>>
>> I tried to deactivate the logging by doing :
>>
>> logging.basicConfig()
>> logging.getLogger('sqlalchemy.engine').setLevel(logging.WARNING)
>>
>> in my wsgi file, but does no work.
>>
>> Am i missing something ?
>>
>> Thank you.
>>
>> Sylvain.
>>
>>
>>
>> _______________________________________________
>> pywps-dev mailing list
>> pywps-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pywps-dev
>>
>>
> --
> Jachym Cepicky
> e-mail: jachym.cepicky at gmail.com
> twitter: @jachymc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20161223/82eb8438/attachment.html>


More information about the pywps-dev mailing list