mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Step 3: Profit! (enable log-level from command line)
This commit is contained in:
parent
46e30a3a3b
commit
2e17b3855b
@ -117,6 +117,15 @@ class SaltCloud(object):
|
||||
help=('Execute a query and return select information about '
|
||||
'the nodes running on configured cloud providers'))
|
||||
|
||||
parser.add_option('-l',
|
||||
'--log-level',
|
||||
dest='log_level',
|
||||
default='warn',
|
||||
help=("Console logging log level. One of 'all', 'garbage',"
|
||||
"'trace', 'debug', 'info', 'warning', 'error', 'quiet'."
|
||||
"For the log file setting see the configuration file."
|
||||
"Default: 'warning'."))
|
||||
|
||||
parser.add_option('--list-locations',
|
||||
dest='list_locations',
|
||||
default=False,
|
||||
|
@ -110,10 +110,8 @@ def create(vm_):
|
||||
print('Failed to start Salt on Cloud VM {0}'.format(vm_['name']))
|
||||
log.warn('Failed to start Salt on Cloud VM {0}'.format(vm_['name']))
|
||||
|
||||
print('Created Cloud VM {0} with the following values:'.format(
|
||||
log.warn('Created Cloud VM {0} with the following values:'.format(
|
||||
vm_['name']
|
||||
))
|
||||
print('Created Cloud VM {0} with the following values:'.format(vm_['name']))
|
||||
log.warn('Created Cloud VM {0} with the following values:'.format(vm_['name']))
|
||||
for key, val in data.__dict__.items():
|
||||
print(' {0}: {1}'.format(key, val))
|
||||
log.warn(' {0}: {1}'.format(key, val))
|
||||
|
Loading…
Reference in New Issue
Block a user