alan-turing-institute / data-safe-haven

https://data-safe-haven.readthedocs.io
BSD 3-Clause "New" or "Revised" License
61 stars 15 forks source link

Remove ANSI escape sequences from logfile #2231

Closed JimMadge closed 1 month ago

JimMadge commented 1 month ago

:white_check_mark: Checklist

:vertical_traffic_light: Depends on

:arrow_heading_up: Summary

Adds a routine to strip ANSI escape sequences from log messages when written to file.

:closed_umbrella: Related issues

Fixes #2222

:microscope: Tests

Tested locally for example,

before,

2024-10-08 15:01:49,040 - INFO -                     vmName                 : output<string>

after,

2024-10-08 16:03:28,875 - INFO -                 vmName            : "shm-daimyo-sre-hojo-vm-workspace-01"
github-actions[bot] commented 1 month ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/logging
  plain_file_handler.py
Project Total  

This report was generated by python-coverage-comment-action