mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
CSV backup work
This commit is contained in:
@@ -19,8 +19,6 @@ def timeNowTZ():
|
||||
return datetime.datetime.now().replace(microsecond=0)
|
||||
|
||||
|
||||
# conf.LOG_LEVEL = get_setting_value("LOG_LEVEL")
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
debugLevels = [
|
||||
('none', 0), ('minimal', 1), ('verbose', 2), ('debug', 3)
|
||||
@@ -49,23 +47,9 @@ def file_print (*args):
|
||||
for arg in args:
|
||||
result += str(arg)
|
||||
print(result)
|
||||
|
||||
# try:
|
||||
# # # Open the file
|
||||
# # file = open(logPath + "/pialert.log", "a")
|
||||
|
||||
# # # Write to the file
|
||||
# # file.write(result + '\n')
|
||||
|
||||
# # # Close the file
|
||||
# # file.close()
|
||||
|
||||
|
||||
append_to_file_with_timeout(logPath + "/pialert.log", result + '\n', 5)
|
||||
|
||||
# except Exception as e:
|
||||
# # Handle the exception, e.g., log it or print an error message
|
||||
# print(f"Error opening or writing to the file: {e}")
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Function to append to the file
|
||||
def append_to_file(file_path, data):
|
||||
|
||||
Reference in New Issue
Block a user