[MapProxy] logging problem - source request either cached or log buffered
Oliver Christen
oliver.christen at camptocamp.com
Mon Jan 27 07:19:10 PST 2014
Dear List
Im having a problem with logging source requests.
I enabled the logging, but doing a "tail -f source-requests.log" doesnt
show the source request every time an image is requested from the
configured source,
instead I'm seeing some kind of random burst of log, being outputed
without any time relation to what's being displayed in my browser,
as if the logging was buffered, maybe,
so I dont really know if Mapproxy is simply not doing the source
request, or if it is doing it, but the request is outputed later in the
log, making it difficult to know if the related images have been
effectively requested or not at the certain time.
see below my layer and source config and my logging config
is there something wrong in the way I configured either my logger or the
layer?
is the logging intended to buffer content before updating the log file?
if so, is there any way to prevent that?
thank you for reading me
best regards
Oliver Christen
layer and cache configuration:
layers:
- name: Taxi
title: Taxi
sources: [TaxiCache]
caches:
TaxiCache:
grids: [swissgrid]
sources: [TaxiS3]
disable_storage: true
TaxiS3:
type: tile
url:
'http://path_to_tiles/Taxi/default/swissgrid/%(z)s/%(y)s/%(x)s.png'
grid: swisstopo
transparent: true
on_error:
403:
response: transparent
cache: True
logging configuration:
from logging.config import fileConfig
import os.path
fileConfig(r'/path_to/log.ini')
log.ini:
[formatters]
keys=default,requests
[logger_root]
level=INFO
handlers=mapproxy
[logger_source_requests]
level=DEBUG
qualname=mapproxy.source.request
# propagate=0 -> do not show up in logger_root
propagate=0
handlers=source_requests
[handler_mapproxy]
class=FileHandler
formatter=default
args=(r"/path_to/mapproxy.log", "a")
[handler_source_requests]
class=FileHandler
formatter=requests
args=(r"/path_to/source-requests.log", "a")
[formatter_default]
format=%(asctime)s - %(levelname)s - %(name)s - %(message)s
[formatter_requests]
format=[%(asctime)s] %(message)s
--
Camptocamp SA
www.camptocamp.com
More information about the MapProxy
mailing list