This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python logging_example_03.py | |
CRITICAL:__main__:foo was called | |
WARNING:__main__:this is a warning message | |
INFO:__main__:this is some information, hope it is helpful | |
ERROR:__main__:this is an error | |
Hello World! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
logging.basicConfig(level=logging.INFO) | |
LOG = logging.getLogger(__name__) | |
def foo(): | |
LOG.critical("foo was called") | |
LOG.debug("this message output from debug") | |
LOG.warning("this is a warning message") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python logging_example_02.py | |
CRITICAL:__main__:foo was called | |
WARNING:__main__:this is a warning message | |
ERROR:__main__:this is an error | |
Hello World! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
logging.basicConfig() | |
LOG = logging.getLogger(__name__) | |
def foo(): | |
LOG.critical("foo was called") | |
LOG.debug("this message output from debug") | |
LOG.warning("this is a warning message") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python logging_example_01.py | |
CRITICAL:__main__:foo was called | |
Hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
logging.basicConfig() | |
LOG = logging.getLogger(__name__) | |
def foo(): | |
LOG.critical("foo was called") | |
print "Hello World!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'magic_tuple' is not defined | |
self.auth_url == http://50.56.25.223:5000/v2.0 | |
self == <novaclient.client.HTTPClient object at 0x1f39450> | |
magic_tuple = urlparse.urlsplit(self.auth_url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for index, key in enumerate(keys): | |
'keyring_key' is not defined | |
keys == ['http://50.56.25.223:5000/v2.0', 'admin', 'admin', '?', 'publicURL', 'compute', '?', '?'] | |
keyring_key = "/".join(keys) | |
keyring_key == http://50.56.25.223:5000/v2.0/admin/admin/?/publicURL/compute/?/? | |
self.os_cache == False | |
self.used_keyring == False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for index, key in enumerate(keys): #key == None; index == 7 | |
if key is None: | |
#keys[index] == None | |
keys[index] = '?' #keys[index] == ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for index, key in enumerate(keys): #key == publicURL; index == 4 | |
if key is None: | |
for index, key in enumerate(keys): #key == compute; index == 5 | |
if key is None: | |
for index, key in enumerate(keys): #key == None; index == 6 | |
if key is None: | |
#keys[index] == None | |
keys[index] = '?' #keys[index] == ? |