socket_logger

Module: tools.socket_logger

Code based on network-logging

This code is mainly a code copy. For license issues of Python code, we refer to: http://docs.python.org/3/license.html

Inheritance diagram for pySPACE.tools.socket_logger:

Inheritance diagram of pySPACE.tools.socket_logger

Class Summary

LogRecordStreamHandler(request, ...) Handler for a streaming logging request.
LogRecordSocketReceiver([host, port, handler]) Simple TCP socket-based logging receiver suitable for testing

Classes

LogRecordStreamHandler

class pySPACE.tools.socket_logger.LogRecordStreamHandler(request, client_address, server)[source]

Bases: SocketServer.StreamRequestHandler

Handler for a streaming logging request.

This basically logs the record using whatever logging policy is configured locally.

Class Components Summary

handle() Handle multiple requests - each expected to be a 4-byte length, followed by the LogRecord in pickle format.
handleLogRecord(record)
unPickle(data)
handle()[source]

Handle multiple requests - each expected to be a 4-byte length, followed by the LogRecord in pickle format. Logs the record according to whatever policy is configured locally.

unPickle(data)[source]
handleLogRecord(record)[source]

LogRecordSocketReceiver

class pySPACE.tools.socket_logger.LogRecordSocketReceiver(host='10.250.5.94', port=9020, handler=<class pySPACE.tools.socket_logger.LogRecordStreamHandler>)[source]

Bases: threading.Thread, SocketServer.ThreadingTCPServer

Simple TCP socket-based logging receiver suitable for testing

..note:: If this class crashes your software, there are problems with your
network configuration. Change your network connection or restart computer.

Class Components Summary

aliaslist
allow_reuse_address
host
lan_ip
run()
shutdown()
allow_reuse_address = True
__init__(host='10.250.5.94', port=9020, handler=<class pySPACE.tools.socket_logger.LogRecordStreamHandler>)[source]
run()[source]
shutdown()[source]
aliaslist = []
host = 'aseeland-imac.dfki.uni-bremen.de'
lan_ip = ['10.250.5.94']