sscargal / pmemchk

MIT License
0 stars 1 forks source link

[Analyzer] Indent INFO messages pertaining to a rule for easier interpretation #133

Closed sscargal closed 2 years ago

sscargal commented 2 years ago

Rules that display INFO, WARNING, or DEBUG messages should be displayed with a small indentation to make it easier to read.

Example:

[ INFO     ] optane_check_dimm_overwrite_status : 1 Overwrite Status found:
[ INFO     ] optane_check_dimm_overwrite_status : Unknown = 0x0001,0x0011,0x0021,0x0101,0x0111,0x0121,0x1001,0x1011,0x1021,0x1101,0x1111,0x1121
[ PASSED   ] optane_check_dimm_overwrite_status : All PMem modules have Overwrite Status == 'Unknown 0'

Would be easier to read if it looked like:

  [ INFO     ] optane_check_dimm_overwrite_status : 1 Overwrite Status found:
  [ INFO     ] optane_check_dimm_overwrite_status : Unknown = 0x0001,0x0011,0x0021,0x0101,0x0111,0x0121,0x1001,0x1011,0x1021,0x1101,0x1111,0x1121
[ PASSED   ] optane_check_dimm_overwrite_status : All PMem modules have Overwrite Status == 'Unknown 0'

Solution: Call the info_msg function with an optional indent argument.