osbrain.logging
— osBrain logging logic¶
Implementation of logging-related features.
-
class
osbrain.logging.
Logger
(name='', host=None, serializer=None, transport=None, attributes=None)¶ Bases:
osbrain.agent.Agent
Specialized Agent for logging. Binds a
SUB
socket and starts logging incoming messages.-
log_handler
(message, topic)¶ Handle incoming log messages.
-
on_init
()¶ Initialize attributes.
-
-
osbrain.logging.
pyro_log
()¶ Set environment variables to activate Pyro logging. The log level is set to “DEBUG”.
-
osbrain.logging.
run_logger
(name, nsaddr=None, addr=None, base=<class 'osbrain.logging.Logger'>)¶ Ease the logger creation process.
This function will create a new logger, start the process and then run its main loop through a proxy.
Parameters: - name (str) – Logger name or alias.
- nsaddr (SocketAddress, default is None) – Name server address.
- addr (SocketAddress, default is None) – New logger address, if it is to be fixed.
Returns: A proxy to the new logger.
Return type: proxy