change formatting for python, extend log messages