pynedm.log

Logging utilities

pynedm.log.debug(*args)[source]

Alias for logging.debug

pynedm.log.log(*args)[source]

Alias for logging.info

pynedm.log.error(*args)[source]

Alias for logging.error

pynedm.log.exception(*args)[source]

Alias for logging.exception

pynedm.log.listening_addresses()[source]

Return external addresses where we are listening to broadcast the log:

Returns:list – [ ‘ws://x.x.x.x:y’, ... ]
class pynedm.log.BroadcastLogFactory(*args, **kw)[source]

Factory for broadcast logger

class pynedm.log.BroadcastLogHandler[source]

Listens on 0.0.0.0 (all interfaces) and sends log messages to connected clients. Clients must connect via WebSocket and receive logging information in JSON format, e.g.:

{ 'level' : 'INFO', 'msg' : 'A sent message' }

This is used in live logging of Raspberry Pis, for example in the nEDM-Interface.

class pynedm.log.BroadcastLogProtocol[source]

Internal class to define broadcast log protocol

pynedm.log.use_broadcaster()[source]

Call this function to enable the use of BroadcastLogHandler

Note, you cannot use this in a function/application that uses twisted.reactor