Skip to content

Commit ef33582

Browse files
authored
Merge pull request #3950 from hove-io/optim_log_readyness_and_others
Optim log readyness and others
2 parents baec48a + e35c9eb commit ef33582

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

source/jormungandr/jormungandr/api.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ def access_log(response, *args, **kwargs):
7474
'status': response.status_code,
7575
'external_request_id': request.headers.get('x-request-id'),
7676
}
77-
logger.info(u'"%(method)s %(path)s?%(query_string)s" %(status)s', d, extra=d)
77+
if 'readyness' not in request.path:
78+
logger.info(u'"%(method)s %(path)s?%(query_string)s" %(status)s', d, extra=d)
79+
else:
80+
logging.getLogger(__name__).debug(u'"%(method)s %(path)s?%(query_string)s" %(status)s', d, extra=d)
81+
7882
return response
7983

8084

source/jormungandr/jormungandr/equipments/equipment_provider_manager.py

-3
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ def _init_class(self, provider_id, cls, arguments):
7777
:return: instance of provider
7878
"""
7979
try:
80-
if '.' not in cls:
81-
self.logger.warning('impossible to build, wrongly formated class: {}'.format(cls))
82-
8380
module_path, name = cls.rsplit('.', 1)
8481
module = import_module(module_path)
8582
attr = getattr(module, name)

source/jormungandr/jormungandr/external_services/external_service_provider_manager.py

-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ def _init_class(self, id, cls, arguments):
8080
:return: instance of external service
8181
"""
8282
try:
83-
if '.' not in cls:
84-
self.logger.warning('impossible to build, wrongly formated class: {}'.format(cls))
85-
8683
module_path, name = cls.rsplit('.', 1)
8784
module = import_module(module_path)
8885
attr = getattr(module, name)

source/jormungandr/jormungandr/parking_space_availability/abstract_provider_manager.py

-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ def _find_provider(self, poi):
8888

8989
def _init_class(self, cls, arguments):
9090
try:
91-
if '.' not in cls:
92-
self.log.warning('impossible to build, wrongly formated class: {}'.format(cls))
93-
9491
module_path, name = cls.rsplit('.', 1)
9592
module = import_module(module_path)
9693
attr = getattr(module, name)

0 commit comments

Comments
 (0)