Logging
By default the SDK prints only warnings and errors. To see more, set the LOG_LEVEL environment variable. You do not configure logging in code.
bash
LOG_LEVEL=debug node app.js # every operation and its outcome
LOG_LEVEL=trace node app.js # adds every frame received
LOG_LEVEL=off node app.js # silent, including errorsLevels are trace, debug, info, warn, error, and off. An unknown value counts as warn. At warn, the default, you see a command's caveat (the warning on its command page) when the SDK sends it.
Reading the output
Each record is one line, with the namespace in brackets and structured fields as key=value:
debug [command] GetUIPoolTempCmd opcode=25 poolId=1
debug [protocol] opening socket host=192.168.1.100 port=10444
debug [command] parsed response name=GetUIPoolTempCmd poolId=1 temp=84The namespaces:
protocolis the UDP layer. It logs sockets, the pause between sends, acknowledgments, and how it joins replies that arrive in several parts.commandlogs each command, with its parameters, its reply, and its caveat if any.omnilogicis the session. It logs whatrefresh()decided, the equipment checks, and the result of eachverify.equipmentlogs the equipment layer's own waits, such as the wait for a light to settle.
The logger passes an Error field to the console as a separate argument, so the console prints the error's full stack.
When reporting a problem
Run with LOG_LEVEL=debug and do the steps in Sending logs.