Obtain more lines during log follow
This commit is contained in:
parent
a38e65be47
commit
f729a54a2c
|
@ -1020,8 +1020,11 @@ def follow_console_log(config, vm, lines=10):
|
||||||
print(loglines, end='')
|
print(loglines, end='')
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# Grab the next line set
|
# Grab the next line set (200 is a reasonable number of lines per second; any more are skipped)
|
||||||
try:
|
try:
|
||||||
|
params = {
|
||||||
|
'lines': 200
|
||||||
|
}
|
||||||
response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params)
|
response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params)
|
||||||
new_console_log = response.json()['data']
|
new_console_log = response.json()['data']
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue