1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-08 11:28:06 +11:00
OC-Minitel/syslog/OpenOS/usr/lib/syslog.lua
2018-07-24 22:15:12 +10:00

20 lines
440 B
Lua

local process = require "process"
local computer = require "computer"
local syslog = {}
syslog.emergency = 0
syslog.alert = 1
syslog.critical = 2
syslog.error = 3
syslog.warning = 4
syslog.notice = 5
syslog.info = 6
syslog.debug = 7
setmetatable(syslog,{__call = function(_,msg, level, service)
level, service = level or syslog.info, service or process.info().path
computer.pushSignal("syslog",msg, level, service)
end})
return syslog