| Conditions | 2 |
| Total Lines | 7 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | '''logs message to terminal. in future may log to database''' |
||
| 7 | def when_log(channel, method, properties, body): |
||
| 8 | '''event handler when log event is raised''' |
||
| 9 | try: |
||
| 10 | print("[{0}] Received log message".format(COMPONENTLOG.app.now())) |
||
| 11 | dolog(body.decode()) |
||
| 12 | except Exception as ex: |
||
| 13 | COMPONENTLOG.app.logexception(ex) |
||
| 14 | |||
| 23 |