Using ubus to log

Is there any way to log to syslog using ubus? I'm writing a lua script and want to do logging, and want to use the syslog.

Thanks,
Levente

yes ...

root@blackhole:~# ubus -v list log
'log' @ad5a59f9
"read":{"lines":"Integer","stream":"Boolean"}
"write":{"event":"String"}

write a log event/message via ubus:

root@blackhole:~# ubus call log write '{"event":"test: Testmessage"}'

logread output:

Tue May 2 11:29:55 2017 kern.emerg test: Testmessage

For LuCI integration check the util class: https://github.com/openwrt/luci/blob/44bf3f0c1640040561306caff39f34ac916b4357/modules/luci-base/luasrc/util.lua

Thank you! That did the trick!

Is there any way to change the "kern.emerg" this is a bit misleading. Forgive my ignorance.

Thanks again!
Lev