mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 10:35:25 +00:00
Improve logging in Python client (#480)
* improve logging in python client * update samples
This commit is contained in:
parent
0a2131d2d3
commit
0d952b79db
6
bin/python-petstore-all.sh
Executable file
6
bin/python-petstore-all.sh
Executable 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
|
@ -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):
|
||||
|
@ -1 +1 @@
|
||||
3.1.0
|
||||
3.1.1-SNAPSHOT
|
@ -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):
|
||||
|
@ -1 +1 @@
|
||||
3.1.0
|
||||
3.1.1-SNAPSHOT
|
@ -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):
|
||||
|
@ -1 +1 @@
|
||||
3.1.0
|
||||
3.1.1-SNAPSHOT
|
@ -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):
|
||||
|
@ -1 +1 @@
|
||||
3.1.0-SNAPSHOT
|
||||
3.1.1-SNAPSHOT
|
@ -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
|
||||
|
||||
|
@ -1 +1 @@
|
||||
3.0.2-SNAPSHOT
|
||||
3.1.1-SNAPSHOT
|
Loading…
Reference in New Issue
Block a user