Skip to content

Commit f0038e0

Browse files
authored
Merge pull request #20 from python-microservices/feature/remove-duplicated-logs
Remove duplicated logs
2 parents e720f7e + a1e9c7b commit f0038e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyms/flask/app/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ def create_app(self):
3232
config = get_conf(service=self.service)
3333
app = connexion.App(__name__, specification_dir=os.path.join(self.path, 'swagger'))
3434
app.add_api('swagger.yaml',
35-
arguments={'title': 'Swagger Example project'},
35+
arguments={'title': config.APP_NAME},
3636
base_path=config.APPLICATION_ROOT
3737
)
3838

3939
self.application = app.app
4040
self.application._connexion_app = app
41-
self.application.config.from_object(get_conf(service=self.service))
41+
self.application.config.from_object(config)
4242
self.application.tracer = None
4343

4444
# Initialize Blueprints
@@ -57,6 +57,7 @@ def create_app(self):
5757
formatter.add_trace_span(self.application.tracer)
5858
log_handler.setFormatter(formatter)
5959
self.application.logger.addHandler(log_handler)
60+
self.application.logger.propagate = False
6061
self.application.logger.setLevel(logging.INFO)
6162

6263
return self.application

0 commit comments

Comments
 (0)