service-core/example/api/core/logmonitor.mjs

7 lines
197 B
JavaScript
Raw Normal View History

2020-09-01 17:31:38 +00:00
import { formatLog } from './loghelper.mjs'
export default function logmonitor(io, config, db, log) {
log.on('newlog', function(data) {
io.to('logger').emit('newlog', formatLog(data))
})
}