update the log message format and add server code