Logging lines
-
@catmanv2 said in Logging lines:
I hate to labour the point, but that fix that I tried?
Oh, yes, right you are. I seem to have lost the plot completely.
...but looking again at the original thread, I see:
@akbooer said in Logging and rotation:
All you need is a one-liner in the Lua Startup Code.
but you responded
OK, so reading the doc I've done this:
luup.attr_set ("openLuup.Logfile.Lines", 20000)
But I assume that's not going to persist.
Do I just do
attr ("openLuup.Logfile.Lines", "20000")
In the start up Lua window?
..and, in fact, I never followed up on that.
So I've just re-tried my original instruction, to add a one-line in the Startup Code (and save it, and reload.)
luup.attr_set ("openLuup.Logfile.Lines", 20000)
which does what I (and you) expect.
...so it was working all the time...
-
-
Note that you do have to do an explicit Luup reload after saving the Startup Lua... unlike Vera, it does not force an automatic reload (thus allowing you to make other changes before reloading.)
@akbooer said in Logging lines:
Note that you do have to do an explicit Luup reload after saving the Startup Lua... unlike Vera, it does not force an automatic reload (thus allowing you to make other changes before reloading.)
Cheers. It does say it does a reload, and I'm sure I did one, but I'm gonna double check.
Rotated at 1805 lines....
C
-
@akbooer said in Logging lines:
Note that you do have to do an explicit Luup reload after saving the Startup Lua... unlike Vera, it does not force an automatic reload (thus allowing you to make other changes before reloading.)
Cheers. It does say it does a reload, and I'm sure I did one, but I'm gonna double check.
Rotated at 1805 lines....
C
-
Pretty sure it's not having it. Forced reload. Log rotate at 1805 lines:
catman@openluup:/etc/cmh-ludl/logs$ cat LuaUPnP.log.1 | wc 1805 18112 264328
Entry in my Lua Startup
-- Add the log lines luup.attr_set ("openLuup.Logfile.Lines", 20000)
I assume I've done something stupid....
C
-
The parameters appears to reflect the actuality:
Logfile Incoming true Lines 2000 Name logs/LuaUPnP.log Versions 5
C
-
@catmanv2 said in Logging lines:
Can't see how to attach files in pm
You can email it to: openLuup at icloud.com
-
@catmanv2 said in Logging lines:
The parameters appears to reflect the actuality:
Then your Startup Code is wrong, or being changed somewhere else. You don’t have any residual edits left over from trying to fix this earlier?
@akbooer said in Logging lines:
@catmanv2 said in Logging lines:
The parameters appears to reflect the actuality:
Then your Startup Code is wrong, or being changed somewhere else. You don’t have any residual edits left over from trying to fix this earlier?
I don't think so. Can't see what else I would have done, or where I would have done it?
-- You can personalise the installation by changing these attributes, -- which are persistent and may be removed from the Startup after a reload. local attr = luup.attr_set ("latitude", 51.76) local attr = luup.attr_set ("City_description", Harlow) local attr = luup.attr_set ("longitude", 0.13) -- Geographical location attr ("City_description", "Harlow") attr ("Country_description", "UNITED KINGDOM") attr ("Region_description", "England") attr ("latitude", "51.76") attr ("longitude", "0.13") -- other parameters attr ("TemperatureFormat", "C") attr ("PK_AccessPoint", "88800000") attr ("currency", "£") attr ("date_format", "dd/mm/yy") attr ("model", "Not a Vera") attr ("timeFormat", "24hr") luup.attr_set ("openLuup.Logfile.Lines", 20000) -- Any other startup processing may be inserted here... luup.log "startup code completed"
Do I need to move the line to about the 'startup code completed?
C
-
This would rather explain it...
2020-12-08 22:41:12.859 openLuup.context_switch:: ERROR: [dev #0] [string "_openLuup_STARTUP_"]:9: attempt to call local 'attr' (a nil value) 2020-12-08 22:41:12.859 openLuup.init:: ERROR: [string "_openLuup_STARTUP_"]:9: attempt to call local 'attr' (a nil value)
You have a syntax error, and you’re not yet using the startup line I recommended.