Add type conversion and encoding for non-str message for msg() in log.py