Log server

Server to stream from MessagePack dictionary logs.

class mpacklog.log_server.LogServer(log_path, port)

Server to stream from MessagePack dictionary logs.

last_log

Last logged dictionary.

log_path

Path to a log file, or a directory containing log files.

port

Port number to listen to.

async listen()

Listen to clients connecting on a given port.

run()

Run the server using asyncio.

Return type:

None

async run_async()

Start the two server coroutines.

Return type:

None

async serve(client, address)

Server a client connection.

Parameters:
  • client – Socket of connection to client.

  • address – IP address and port of the connection.

Return type:

None

async stop()

Stop the two server coroutines.

async unpack()

Unpack latest data from log file.