mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-23 10:38:05 +11:00
added an option to display log messages over a certain priority
This commit is contained in:
parent
ff4ab9c0b9
commit
43c6f5279d
@ -12,7 +12,8 @@ cfg.receive = false
|
|||||||
cfg.write = true
|
cfg.write = true
|
||||||
cfg.destination = "/dev/null"
|
cfg.destination = "/dev/null"
|
||||||
cfg.minlevel = 6
|
cfg.minlevel = 6
|
||||||
cfg.beeplevel = 3
|
cfg.beeplevel = -1
|
||||||
|
cfg.displevel = 2
|
||||||
cfg.filter = {} -- todo
|
cfg.filter = {} -- todo
|
||||||
|
|
||||||
local listeners = {}
|
local listeners = {}
|
||||||
@ -62,6 +63,9 @@ local function wentry(_,msg,level,service,host)
|
|||||||
if level <= cfg.beeplevel then
|
if level <= cfg.beeplevel then
|
||||||
computer.beep()
|
computer.beep()
|
||||||
end
|
end
|
||||||
|
if level <= cfg.displevel then
|
||||||
|
io.write(string.format("%.2f\t%s\t",ut,host)..entry)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function remote_listener(_,from,port,data)
|
local function remote_listener(_,from,port,data)
|
||||||
|
Loading…
Reference in New Issue
Block a user