diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
| commit | 967be9e750221ab2ab783f95df79bb26d290a45e (patch) | |
| tree | 6802900a5e975f9f68b169f0f503f040056d6952 /ero1/src/helper/debug_printer.py | |
Diffstat (limited to 'ero1/src/helper/debug_printer.py')
| -rw-r--r-- | ero1/src/helper/debug_printer.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ero1/src/helper/debug_printer.py b/ero1/src/helper/debug_printer.py new file mode 100644 index 0000000..b276630 --- /dev/null +++ b/ero1/src/helper/debug_printer.py @@ -0,0 +1,13 @@ +from datetime import datetime + +def debug_print(message, started): + """ + Affiche dans la console un message de débug s'il est activé avec un timestamp. + Parameters: + message : Le message à afficher. + started : Indique si le debug est activé ou non. + """ + if started: + # Récupérer le timestamp actuel en format string + str_time = datetime.now().strftime('%H:%M:%S.%f')[:-3] + print(f"[{str_time}] [DEBUG] {message}") |
