Often it’s quite verbose, but I like the capability of getting to it quickly. Is it possible to alter that URL to filter out some of what I don’t want to see… or, better yet, only select what I’m specifically wanting to see… i.e. the lines I’m logging from my code, the stuff with luup_log:0: at the beginning?
I write my own log file from the lua code via a global home made fuction . I can view the log via http://xx.xx.xx.xx/DebugLog.txt
In lua coge I have put debug lines like
…
DebugLog ( "parameter1 value: " … Parameter1)
…
The fuction is in startup lua so it is global and can be used in every code
…
function DebugLog(message, clear)
local socket = require(“socket”)
local time = socket.gettime() or os.time()
local tms = string.format(“.%03d “,math.floor (1000 * (time % 1)))
local stamp = os.date(”%d %b %Y %T”,math.floor(time)) … tms
local mode = “a "
if clear then mode = “w " end
local file = io.open(”/www/DebugLog.txt”, mode)
file:write(stamp … (message or “”) … “\n”)
file:close()
end
Do not forget to comment out the debug lines after the your lua code works
DebugLog ( "parameter1 value: " … Parameter1,true) resets the debug file
Often it’s quite verbose, but I like the capability of getting to it quickly. Is it possible to alter that URL to filter out some of what I don’t want to see… or, better yet, only select what I’m specifically wanting to see… i.e. the lines I’m logging from my code, the stuff with luup_log:0: at the beginning?[/quote]
I use this Excel macro log viewer (ELVira). It’s awesome with all kinds of pre/post filters: