Skip to content

Commit

Permalink
MM-62105 use WARN log level when ws can't report hostname (mattermost…
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkrauser authored Dec 10, 2024
1 parent 4c27e6e commit f1d5884
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/channels/app/platform/web_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,10 @@ func (wc *WebConn) createHelloMessage() *model.WebSocketEvent {

hostname, err := os.Hostname()
if err != nil {
wc.Platform.logger.Error("Could not get hostname", mlog.Err(err))
wc.Platform.logger.Warn("Could not get hostname",
mlog.String("user_id", wc.UserId),
mlog.String("conn_id", wc.GetConnectionID()),
mlog.Err(err))
// return without the hostname in the message
return msg
}
Expand Down

0 comments on commit f1d5884

Please sign in to comment.