Added selection of logging level.

This commit is contained in:
gSpot
2025-08-01 18:50:07 +03:00
parent fcd78c296c
commit eb93cd47b7
13 changed files with 131 additions and 102 deletions

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=internet-detector-mod-email
PKG_VERSION:=1.6.0
PKG_VERSION:=1.6.1
PKG_RELEASE:=1
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>

View File

@@ -123,8 +123,8 @@ function Module:sendMessage(msg, textPattern)
-- Debug
if self.config.debug then
verboseArg = " -v"
self.debugOutput(string.format("--- %s ---", self.name))
end
self.debugOutput(string.format("--- %s ---", self.name))
local securityArgs = "-starttls -auth-login"
if self.mailSecurity == "ssl" then
@@ -140,10 +140,8 @@ function Module:sendMessage(msg, textPattern)
emailMsg)
-- Debug
if self.config.debug then
self.debugOutput(string.format("%s: %s", self.name, mtaCmd))
self.syslog("debug", string.format("%s: %s", self.name, mtaCmd))
end
self.debugOutput(string.format("%s: %s", self.name, mtaCmd))
self.syslog("debug", string.format("%s: %s", self.name, mtaCmd))
retVal = os.execute(mtaCmd)
if retVal == 0 then