mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +00:00
fw: move version and cmd line logging to main()
Move the logging of the WA version and command line used to invoke it from run command into main() inside entrypoint. That way, these will be the first entries in the log file, now that early log records are no longer lost.
This commit is contained in:
parent
1e750c659b
commit
7cf0b881c1
@ -24,7 +24,6 @@ from wa.framework import pluginloader
|
||||
from wa.framework.configuration.parsers import AgendaParser
|
||||
from wa.framework.execution import Executor
|
||||
from wa.framework.output import init_run_output
|
||||
from wa.framework.version import get_wa_version
|
||||
from wa.framework.exception import NotFoundError, ConfigError
|
||||
from wa.utils import log
|
||||
from wa.utils.types import toggle_set
|
||||
|
@ -26,6 +26,7 @@ from wa.framework.configuration import settings
|
||||
from wa.framework.configuration.execution import ConfigManager
|
||||
from wa.framework.host import init_user_directory, init_config
|
||||
from wa.framework.exception import ConfigError
|
||||
from wa.framework.version import get_wa_version
|
||||
from wa.utils import log
|
||||
from wa.utils.doc import format_body
|
||||
|
||||
@ -94,6 +95,8 @@ def main():
|
||||
args, _ = parser.parse_known_args(filtered_argv)
|
||||
settings.set("verbosity", args.verbose)
|
||||
log.init(settings.verbosity)
|
||||
logger.debug('Version: {}'.format(get_wa_version()))
|
||||
logger.debug('Command Line: {}'.format(' '.join(sys.argv)))
|
||||
|
||||
# each command will add its own subparser
|
||||
commands = load_commands(parser.add_subparsers(dest='command'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user