mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
logger not repsecting new lines #1217
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
0
install/proxmox/README.md
Normal file → Executable file
0
install/proxmox/README.md
Normal file → Executable file
0
install/proxmox/netalertx.conf
Normal file → Executable file
0
install/proxmox/netalertx.conf
Normal file → Executable file
0
install/proxmox/requirements.txt
Normal file → Executable file
0
install/proxmox/requirements.txt
Normal file → Executable 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
0
test/test_compound_conditions.py
Normal file → Executable file
Reference in New Issue
Block a user