mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-10 05:26:49 +03:00
main.InternetDetector.debugOutput().
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=internet-detector-mod-email
|
||||
PKG_VERSION:=1.5.1
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=1.5.2
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -11,6 +11,7 @@ local Module = {
|
||||
debug = false,
|
||||
},
|
||||
syslog = function(level, msg) return true end,
|
||||
debugOutput = function(msg) return true end,
|
||||
writeValue = function(filePath, str) return false end,
|
||||
readValue = function(filePath) return nil end,
|
||||
deadPeriod = 0,
|
||||
@@ -122,8 +123,7 @@ function Module:sendMessage(msg, textPattern)
|
||||
-- Debug
|
||||
if self.config.debug then
|
||||
verboseArg = " -v"
|
||||
io.stdout:write(string.format("--- %s ---\n", self.name))
|
||||
io.stdout:flush()
|
||||
self.debugOutput(string.format("--- %s ---", self.name))
|
||||
end
|
||||
|
||||
local securityArgs = "-starttls -auth-login"
|
||||
@@ -141,8 +141,7 @@ function Module:sendMessage(msg, textPattern)
|
||||
|
||||
-- Debug
|
||||
if self.config.debug then
|
||||
io.stdout:write(string.format("%s: %s\n", self.name, mtaCmd))
|
||||
io.stdout:flush()
|
||||
self.debugOutput(string.format("%s: %s", self.name, mtaCmd))
|
||||
self.syslog("debug", string.format("%s: %s", self.name, mtaCmd))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user