Commit 9d7b04e6 authored by dmitry.mashoshin's avatar dmitry.mashoshin
Browse files

Merge branch 'zamirets/change-logger-usage' into 'master'

Bump prozorro-tools to latest version and change logger usage

See merge request !172
parents 29606167 f21ca06a
......@@ -3,10 +3,10 @@ from aiohttp import WSMsgType
import ujson
from mongodb_mirror.errors import MirrorUnexpectedResponse, WSMsgTypeClosedException, UnexpectedWSMsgTypeException
from prozorro_sale import tools
from import logger
LOG = tools.logging.get_custom_logger(__name__)
LOG = logger.get_custom_logger(__name__)
class MirrorClient:
......@@ -13,13 +13,15 @@ from bson import ObjectId
from motor import motor_asyncio
from pymongo.errors import PyMongoError
from mongodb_mirror import utils, client
from prozorro_sale import tools, metrics
from prozorro_sale import metrics
from import logger
from import request_id_middleware
from mongodb_mirror.utils import MongoOperation
from mongodb_mirror.errors import ClientTimestampException, IncorrectTimestamp, CriticalError, MirrorClosed
import prometheus_client
LOG = tools.logging.get_custom_logger(__name__)
LOG = logger.get_custom_logger(__name__)
MONGO_URL = os.environ['MONGO_URL']
......@@ -312,13 +314,13 @@ class BaseApp:
def __init__(self):
self.__common_routes = [web.get('/ping', ping)]
self.__common_middlewares = [tools.logging.request_id_middleware]
self.__common_middlewares = [request_id_middleware]
def _configure_logging(self):
def _init_loop(self):
loop = asyncio.get_event_loop()
......@@ -360,5 +362,5 @@ class BaseApp:
def run(self):
app = self._init_app()
app_wrapper = metrics.ApplicationWrapper()
app_wrapper.add_web_app(_app=app, _port=80, access_log_class=tools.logging.CustomAccessLogger)
app_wrapper.add_web_app(_app=app, _port=80, access_log_class=logger.CustomAccessLogger)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment