Logging and rotation
-
It was. About 10 times what the original value was (it was 2000)
Currently 2000 is rotating every 20-30 minutes while I'm messing. Longest I had was 9 hours from 2200 last night to about 0700 this morning.
Unless there's a really good reason I'd like about a day to a log....
Cheers
C
-
Well, interesting...
The
openLuup/logs.lua
file hasn't been updated since March, 2018. Although the infrastructure is there to selected file sizes, rotations, etc., at startup time, it's not used!As a workaround, you can simply patch the numbers that you find at the start of that file (lines 47-50):
-- openLuup configuration options: local Logfile = "logs/LuaUPnP.log" -- full path to log file local LogfileLines = 2000 -- number of logfile lines before rotation local LogfileVersions = 5 -- number of versions to retain
I'll add that to the "must fix" list!
Apologies,
AK
-
Never a need to apologise!
But you are going to hate me: my first attempt was....
-- openLuup configuration options: local Logfile = "logs/LuaUPnP.log" -- full path to log file local LogfileLines = 20000 -- number of logfile lines before rotation local LogfileVersions = 5 -- number of versions to retain local StartupLogfile = "logs/LuaUPnP_startup.log" --[[
Which I have not reverted......
C
-
I'm loathe to say it doesn't work as mostly It's luser error but I have (currently)
local LogfileLines = 20000
in my lua.logs file
and what you see in the console above and my logs rotating quite frequently-rw-r--r-- 1 root root 23063 Jul 3 11:46 LuaUPnP_startup.log.5 -rw-r--r-- 1 root root 23063 Jul 3 13:36 LuaUPnP_startup.log.4 -rw-r--r-- 1 root root 23063 Jul 3 14:53 LuaUPnP_startup.log.3 -rw-r--r-- 1 root root 23063 Jul 3 14:54 LuaUPnP_startup.log.2 -rw-r--r-- 1 root root 77651 Jul 3 14:56 LuaUPnP.log.5 -rw-r--r-- 1 root root 23063 Jul 3 14:56 LuaUPnP_startup.log.1 -rw-r--r-- 1 root root 85688 Jul 3 14:59 LuaUPnP.log.4 -rw-r--r-- 1 root root 23063 Jul 3 14:59 LuaUPnP_startup.log -rw-r--r-- 1 root root 280763 Jul 3 15:20 LuaUPnP.log.3 -rw-r--r-- 1 root root 354596 Jul 3 16:50 LuaUPnP.log.2 -rw-r--r-- 1 root root 356790 Jul 3 17:59 LuaUPnP.log.1 -rw-r--r-- 1 root root 79932 Jul 3 18:07 LuaUPnP.log
C
-
I can’t help noticing that the most recent ones are an order of magnitude larger than the earlier ones...?
@akbooer said in Logging and rotation:
I can’t help noticing that the most recent ones are an order of magnitude larger than the earlier ones...?
A fair shout, sir. However I made the changes rather earlier than those. I've been messing with some settings and you get a rotation each reload
catman@openluup:/etc/cmh-ludl/logs$ ls -ltr total 1544 -rw-r--r-- 1 root root 23063 Jul 3 11:46 LuaUPnP_startup.log.5 -rw-r--r-- 1 root root 23063 Jul 3 13:36 LuaUPnP_startup.log.4 -rw-r--r-- 1 root root 23063 Jul 3 14:53 LuaUPnP_startup.log.3 -rw-r--r-- 1 root root 23063 Jul 3 14:54 LuaUPnP_startup.log.2 -rw-r--r-- 1 root root 77651 Jul 3 14:56 LuaUPnP.log.5 -rw-r--r-- 1 root root 23063 Jul 3 14:56 LuaUPnP_startup.log.1 -rw-r--r-- 1 root root 85688 Jul 3 14:59 LuaUPnP.log.4 -rw-r--r-- 1 root root 23063 Jul 3 14:59 LuaUPnP_startup.log -rw-r--r-- 1 root root 280763 Jul 3 15:20 LuaUPnP.log.3 -rw-r--r-- 1 root root 354596 Jul 3 16:50 LuaUPnP.log.2 -rw-r--r-- 1 root root 356790 Jul 3 17:59 LuaUPnP.log.1 -rw-r--r-- 1 root root 257890 Jul 3 18:40 LuaUPnP.log
and...
catman@openluup:/etc/cmh-ludl/logs$ cat LuaUPnP.log.1 | wc -l 2002
Cheers
C
-
@akbooer said in Logging and rotation:
I can’t help noticing that the most recent ones are an order of magnitude larger than the earlier ones...?
A fair shout, sir. However I made the changes rather earlier than those. I've been messing with some settings and you get a rotation each reload
catman@openluup:/etc/cmh-ludl/logs$ ls -ltr total 1544 -rw-r--r-- 1 root root 23063 Jul 3 11:46 LuaUPnP_startup.log.5 -rw-r--r-- 1 root root 23063 Jul 3 13:36 LuaUPnP_startup.log.4 -rw-r--r-- 1 root root 23063 Jul 3 14:53 LuaUPnP_startup.log.3 -rw-r--r-- 1 root root 23063 Jul 3 14:54 LuaUPnP_startup.log.2 -rw-r--r-- 1 root root 77651 Jul 3 14:56 LuaUPnP.log.5 -rw-r--r-- 1 root root 23063 Jul 3 14:56 LuaUPnP_startup.log.1 -rw-r--r-- 1 root root 85688 Jul 3 14:59 LuaUPnP.log.4 -rw-r--r-- 1 root root 23063 Jul 3 14:59 LuaUPnP_startup.log -rw-r--r-- 1 root root 280763 Jul 3 15:20 LuaUPnP.log.3 -rw-r--r-- 1 root root 354596 Jul 3 16:50 LuaUPnP.log.2 -rw-r--r-- 1 root root 356790 Jul 3 17:59 LuaUPnP.log.1 -rw-r--r-- 1 root root 257890 Jul 3 18:40 LuaUPnP.log
and...
catman@openluup:/etc/cmh-ludl/logs$ cat LuaUPnP.log.1 | wc -l 2002
Cheers
C
-
@akbooer said in Logging and rotation:
@CatmanV2 said in Logging and rotation:
and...
...I hate people with Unix skills.
Hah! How do you think I feel hanging around with people that understand code
Like a bloody drummer, that's what!
C