Organize the use of 'log' and replace 'log' with LOG
Change-Id: I42ddf63dd73559e43efce401f3912c4b9413a6d4
This commit is contained in:
parent
c557e45ae2
commit
3926dcc541
@ -47,8 +47,6 @@ _IDENTITY_API_VERSION_3 = ['3']
|
|||||||
class WatcherShell(app.App):
|
class WatcherShell(app.App):
|
||||||
"""Watcher command line interface."""
|
"""Watcher command line interface."""
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.client = None
|
self.client = None
|
||||||
|
|
||||||
@ -194,12 +192,12 @@ class WatcherShell(app.App):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
if not logging.getLogger('').handlers:
|
if not logging.getLogger('').handlers:
|
||||||
logging.basicConfig()
|
logging.basicConfig()
|
||||||
self.log.error('Exception raised: %s', str(e))
|
LOG.error('Exception raised: %s', str(e))
|
||||||
|
|
||||||
return ret_val
|
return ret_val
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
self.log.info("END return value: %s", ret_val)
|
LOG.info("END return value: %s", ret_val)
|
||||||
|
|
||||||
|
|
||||||
def main(argv=sys.argv[1:]):
|
def main(argv=sys.argv[1:]):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user