Switch to using "go.uber.org/zap" for structured logging.#820
Switch to using "go.uber.org/zap" for structured logging.#820
Conversation
1b285a1 to
f953695
Compare
|
|
||
| addr := c.RemoteAddr() | ||
| log := c.log.With( | ||
| zap.String("addr", addr), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| } | ||
|
|
||
| log := c.log.With( | ||
| zap.String("addr", c.RemoteAddr()), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| c.conn.SetWriteDeadline(time.Now().Add(writeWait)) // nolint | ||
| if err := c.conn.WriteMessage(websocket.CloseMessage, closeData); err != nil { | ||
| log := c.log.With( | ||
| zap.String("addr", c.RemoteAddr()), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| c.conn.SetWriteDeadline(time.Now().Add(writeWait)) // nolint | ||
| if err := c.conn.WriteMessage(websocket.PingMessage, []byte(msg)); err != nil { | ||
| log := c.log.With( | ||
| zap.String("addr", c.RemoteAddr()), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| if !ok { | ||
| log.Printf("Can't register non-client %T", c) | ||
| h.log.Warn("Can't register non-client", | ||
| zap.Any("client", c), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| if err != nil { | ||
| log.Printf("Could not create client for %s: %s", addr, err) | ||
| log.Error("Could not create client", | ||
| zap.String("addr", addr), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| zap.Any("candidate", candidate), | ||
| zap.Any("streamtype", client.StreamType()), | ||
| zap.String("id", client.Id()), | ||
| zap.Any("client", client), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| s.log.Warn("Received ice completed event from unknown client", | ||
| zap.Any("streamtype", client.StreamType()), | ||
| zap.String("id", client.Id()), | ||
| zap.Any("client", client), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| log.Printf("Detected bruteforce attempt on \"%s\" from %s", action, client) | ||
| t.log.Info("Detected bruteforce attempt", | ||
| zap.String("action", action), | ||
| zap.String("client", client), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
| log.Printf("Failed attempt on \"%s\" from %s, throttling by %s", action, client, delay) | ||
| t.log.Info("Failed attempt, throttling", | ||
| zap.String("action", action), | ||
| zap.String("client", client), |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
f953695 to
4771d5d
Compare
Pull Request Test Coverage Report for Build 10872977727Details
💛 - Coveralls |
No description provided.