Implement logger: log_msg()
Avoid type-punning pointer warnings, use C99