updated logging
This commit is contained in:
Родитель
69d25674ea
Коммит
518aa52d55
|
@ -34,15 +34,6 @@ export function logToConsole(priority: LoggerPriority, message: string) {
|
|||
export function enableLogging(bus: JDBus, logFn = logToConsole) {
|
||||
bus.minLoggerPriority = LoggerPriority.Debug
|
||||
bus.subscribe(PACKET_REPORT, (pkt: Packet) => {
|
||||
if (
|
||||
pkt.serviceClass === SRV_DEVICE_SCRIPT_MANAGER &&
|
||||
pkt.serviceCommand === DeviceScriptManagerCmd.LogMessage
|
||||
) {
|
||||
const [counter, flags, content] =
|
||||
pkt.jdunpack<[number, number, string]>("u8 u8 s")
|
||||
logFn(LoggerPriority.Log, prefixMsg(pkt.device.shortId, content))
|
||||
}
|
||||
|
||||
if (
|
||||
pkt.serviceClass === SRV_LOGGER &&
|
||||
LoggerCmd.Debug <= pkt.serviceCommand &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче