mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
last_result.log -> /log/plugins/last_result.PLUGPREF.log
This commit is contained in:
@@ -19,7 +19,7 @@ sys.path.extend([f"{INSTALL_PATH}/front/plugins", f"{INSTALL_PATH}/server"])
|
||||
|
||||
# NetAlertX modules
|
||||
import conf
|
||||
from const import apiPath, confFileName
|
||||
from const import apiPath, confFileName, logPath
|
||||
from plugin_utils import getPluginObject
|
||||
from plugin_helper import Plugin_Objects
|
||||
from logger import mylog, append_line_to_file
|
||||
@@ -27,9 +27,10 @@ from helper import timeNowTZ, get_setting_value, bytes_to_string, sanitize_strin
|
||||
from notification import Notification_obj
|
||||
from database import DB, get_device_stats
|
||||
|
||||
pluginName = 'TESTONLY'
|
||||
|
||||
CUR_PATH = str(pathlib.Path(__file__).parent.resolve())
|
||||
RESULT_FILE = os.path.join(CUR_PATH, 'last_result.log')
|
||||
LOG_PATH = logPath + '/plugins'
|
||||
RESULT_FILE = os.path.join(LOG_PATH, f'last_result.{pluginName}.log')
|
||||
|
||||
|
||||
# Initialize the Plugin obj output file
|
||||
@@ -37,7 +38,7 @@ plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
# Create an MD5 hash object
|
||||
md5_hash = hashlib.md5()
|
||||
|
||||
pluginName = 'TESTONLY'
|
||||
|
||||
|
||||
# globals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user