Skip to content

Resolve "declutter the top level log file"

Ashwin Kumar Karnad requested to merge 28-declutter-the-top-level-log-file-2 into main

Refactor the execution summary based on #28 (closed) . Created new functions:

  • write_to_file
  • write_to_cmd_log

record_script_execution_summary function now only records the headder. New logging:

❯ l
❯ mpsd-software init
❯ l
.rw-r--r--@   0 karnada cfel  3 Aug 11:31  .mpsd-software-root
.rw-r--r--@ 143 karnada cfel  3 Aug 11:31  mpsd-software.log
cat mpsd-software.log

 2023-08-03T11:31:30
$ mpsd-software init
Initialising MPSD software instance at /tmp/testinstaller.
MPSD Software manager version: 2023.6.27
❯ mpsd-software install dev-23a/ global_generic
ls
 dev-23a   mpsd-software.log
cat mpsd-software.log

 2023-08-03T11:31:30
$ mpsd-software init
Initialising MPSD software instance at /tmp/testinstaller.
MPSD Software manager version: 2023.6.27

 2023-08-03T11:31:44
$ mpsd-software install dev-23a/ global_generic
> logging to /tmp/testinstaller/dev-23a/logs/dev-23a_zen3_2023-08-03T11-31-44_APEX_install.log
Spack environments branch: releases/dev-23a (commit hash: 91ba21f40ff9e635da15a4c154360f5e969d6fe4)


ls dev-23a/logs/
 dev-23a_zen3_2023-08-03T11-31-44_APEX_install.log   dev-23a_zen3_2023-08-03T11-31-44_BUILD_global_generic_install.log

tail dev-23a/logs/dev-23a_zen3_2023-08-03T11-31-44_APEX_install.log
.
.
.
[11:31:46]    INFO 1070  |  Installing package_set global_generic to /tmp/testinstaller/dev-23a/zen3
[11:31:46]    INFO 1071  |  > Logging installation of global_generic at /tmp/testinstaller/dev-23a/logs/dev-23a_zen3_2023-08-03T11-31-44_BUILD_global_generic_install.log
[11:31:46]   DEBUG  635  |  ##-07 Starting subprocess.run('bash /tmp/testinstaller/dev-23a/spack-environments/spack_setup.sh -b global_generic 2>&1 | tee -a /tmp/testinstaller/dev-23a/logs/dev-23a_zen3_2023-08-03T11-31-44_BUILD_global_generic_install.log ') with options shell=True, check=True

Closes #28 (closed)

Edited by Ashwin Kumar Karnad

Merge request reports

Loading