Add guarantee to format_log_message

Also solve minor compilation errors.
Separate info from notice level messages