lib/ui.py: Reverse the print order of event and error log

Signed-off-by: Dong Zhu <donzhu@cisco.com>