logger not repsecting new lines #1217

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-10-05 14:02:00 +11:00
parent bdaa53cc53
commit d05ddafdd3
5 changed files with 3 additions and 1 deletions

0
install/proxmox/README.md Normal file → Executable file
View File

0
install/proxmox/netalertx.conf Normal file → Executable file
View File

0
install/proxmox/requirements.txt Normal file → Executable file
View File

View File

@@ -125,6 +125,8 @@ def start_log_writer_thread():
def file_print(*args): def file_print(*args):
result = timeNowTZ().strftime('%H:%M:%S') + ' ' result = timeNowTZ().strftime('%H:%M:%S') + ' '
for arg in args: for arg in args:
if isinstance(arg, list):
arg = ' '.join(str(a) for a in arg) # so taht new lines are handled correctly also when passing a list
result += str(arg) result += str(arg)
logging.log(custom_to_logging_levels.get(currentLevel, logging.NOTSET), result) logging.log(custom_to_logging_levels.get(currentLevel, logging.NOTSET), result)

0
test/test_compound_conditions.py Normal file → Executable file
View File