mknx/smarthome — pull request #93 by ohinckel (2014-03-02 23:16:42+00:00)
Title: New "ld" (log dump) command for CLI

The CLI plugin will get a new command `ld` (log dump) which can be used to dump a log to the console. It will return the items of the SmartHome.py internal log (`env.core.log`, see first example), but can also be used with other log when a name is specified (see second example).

```
> ld
Log dump of 'env.core.log':
['2014-03-03 00:04:21.381223+01:00', 'Connections', 'ERROR', 'TCPDispatcher: problem binding 0.0.0.0:2727 (TCP): [Errno 98] Address already in use']
['2014-03-03 00:04:11.274116+01:00', 'Connections', 'ERROR', 'WebSocket: problem binding 0.0.0.0:2424 (TCP): [Errno 98] Address already in use']
['2014-03-03 00:04:11.263054+01:00', 'Connections', 'ERROR', 'TCPDispatcher: problem binding 0.0.0.0:2727 (TCP): [Errno 98] Address already in use']
['2014-03-03 00:04:01.118701+01:00', 'Connections', 'ERROR', 'WebSocket: problem binding 0.0.0.0:2424 (TCP): [Errno 98] Address already in use']
['2014-03-03 00:04:01.107315+01:00', 'Connections', 'ERROR', 'TCPDispatcher: problem binding 0.0.0.0:2727 (TCP): [Errno 98] Address already in use']
[...]
> ld env.core.log
Log dump of 'env.core.log':
['2014-03-03 00:04:21.381223+01:00', 'Connections', 'ERROR', 'TCPDispatcher: problem binding 0.0.0.0:2727 (TCP): [Errno 98] Address already in use']
['2014-03-03 00:04:11.274116+01:00', 'Connections', 'ERROR', 'WebSocket: problem binding 0.0.0.0:2424 (TCP): [Errno 98] Address already in use']
['2014-03-03 00:04:11.263054+01:00', 'Connections', 'ERROR', 'TCPDispatcher: problem binding 0.0.0.0:2727 (TCP): [Errno 98] Address already in use']
['2014-03-03 00:04:01.118701+01:00', 'Connections', 'ERROR', 'WebSocket: problem binding 0.0.0.0:2424 (TCP): [Errno 98] Address already in use']
['2014-03-03 00:04:01.107315+01:00', 'Connections', 'ERROR', 'TCPDispatcher: problem binding 0.0.0.0:2727 (TCP): [Errno 98] Address already in use']
[...]
>
````