Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
less verbose logging and adding a custom logger for aiohttp
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodbare committed Dec 19, 2016
1 parent 3cf6698 commit 60a22ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/plone.server/plone/server/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
except ImportError:
RSA = None

logger = logging.getLogger(__name__)
logger = logging.getLogger('plone.server')


@implementer(IApplication)
Expand Down Expand Up @@ -264,7 +264,7 @@ def update_app_settings(settings):
def make_app(config_file=None, settings=None):

# Initialize aiohttp app
app = web.Application(router=TraversalRouter())
app = web.Application(router=TraversalRouter(), logger=logger)

# Create root Application
root = ApplicationRoot(config_file)
Expand Down
10 changes: 5 additions & 5 deletions src/plone.server/plone/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@

import argparse
import json
import logging
# import logging


logger = logging.getLogger('plone.server')
# logger = logging.getLogger('plone.server')
# logging.basicConfig(
# level=logging.DEBUG,
# format='%(threadName)10s %(name)18s: %(message)s',)


def main():
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--configuration',
default='config.json', help='Configuration file')
arguments = parser.parse_args()
logging.basicConfig(
level=logging.DEBUG,
format='%(threadName)10s %(name)18s: %(message)s',)

with open(arguments.configuration, 'r') as config:
settings = json.load(config)
Expand Down

0 comments on commit 60a22ed

Please sign in to comment.