Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacific: vstart_runner: maintain log level when --debug is passed #52977

Merged
merged 1 commit into from Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions qa/tasks/vstart_runner.py
Expand Up @@ -63,7 +63,7 @@
except:
pass

def init_log():
def init_log(log_level=logging.INFO):
global log
if log is not None:
del log
Expand All @@ -78,7 +78,7 @@ def init_log():
datefmt='%Y-%m-%dT%H:%M:%S')
handler.setFormatter(formatter)
log.addHandler(handler)
log.setLevel(logging.INFO)
log.setLevel(log_level)

log = None
init_log()
Expand Down Expand Up @@ -1344,7 +1344,7 @@ def clear_old_log():
os.remove(logpath)
with open(logpath, 'w') as logfile:
logfile.write('')
init_log()
init_log(log.level)
log.debug('logging in a fresh file now...')


Expand Down