Improve logging in Python client (#480)

* improve logging in python client

* update samples
This commit is contained in:
William Cheng 2018-07-10 22:12:09 +08:00 committed by GitHub
parent 0a2131d2d3
commit 0d952b79db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 12 additions and 50 deletions

6
bin/python-petstore-all.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# update python petstore clients
./bin/python-asyncio-petstore.sh
./bin/python-petstore.sh
./bin/python-tornado-petstore.sh

View File

@ -125,17 +125,6 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.logger_file_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_file_handler)
if self.logger_stream_handler:
logger.removeHandler(self.logger_stream_handler)
else:
# If not set logging file,
# then add stream handler and remove file handler.
self.logger_stream_handler = logging.StreamHandler()
self.logger_stream_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_stream_handler)
if self.logger_file_handler:
logger.removeHandler(self.logger_file_handler)
@property
def debug(self):

View File

@ -1 +1 @@
3.1.0
3.1.1-SNAPSHOT

View File

@ -133,17 +133,6 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.logger_file_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_file_handler)
if self.logger_stream_handler:
logger.removeHandler(self.logger_stream_handler)
else:
# If not set logging file,
# then add stream handler and remove file handler.
self.logger_stream_handler = logging.StreamHandler()
self.logger_stream_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_stream_handler)
if self.logger_file_handler:
logger.removeHandler(self.logger_file_handler)
@property
def debug(self):

View File

@ -1 +1 @@
3.1.0
3.1.1-SNAPSHOT

View File

@ -133,17 +133,6 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.logger_file_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_file_handler)
if self.logger_stream_handler:
logger.removeHandler(self.logger_stream_handler)
else:
# If not set logging file,
# then add stream handler and remove file handler.
self.logger_stream_handler = logging.StreamHandler()
self.logger_stream_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_stream_handler)
if self.logger_file_handler:
logger.removeHandler(self.logger_file_handler)
@property
def debug(self):

View File

@ -1 +1 @@
3.1.0
3.1.1-SNAPSHOT

View File

@ -133,17 +133,6 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.logger_file_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_file_handler)
if self.logger_stream_handler:
logger.removeHandler(self.logger_stream_handler)
else:
# If not set logging file,
# then add stream handler and remove file handler.
self.logger_stream_handler = logging.StreamHandler()
self.logger_stream_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_stream_handler)
if self.logger_file_handler:
logger.removeHandler(self.logger_file_handler)
@property
def debug(self):

View File

@ -1 +1 @@
3.1.0-SNAPSHOT
3.1.1-SNAPSHOT

View File

@ -2,7 +2,7 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
Generated by OpenAPI Generator 3.1.0-SNAPSHOT.
Generated by OpenAPI Generator 3.1.1-SNAPSHOT.
## Requires

View File

@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.1-SNAPSHOT