mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
smtp: Use zerolog hooks for warns/errors expvars #90
This commit is contained in:
@@ -113,7 +113,9 @@ func (s *Session) String() string {
|
||||
* 5. Goto 2
|
||||
*/
|
||||
func (s *Server) startSession(id int, conn net.Conn) {
|
||||
logger := log.With().Str("module", "smtp").Str("remote", conn.RemoteAddr().String()).
|
||||
logger := log.Hook(logHook{}).With().
|
||||
Str("module", "smtp").
|
||||
Str("remote", conn.RemoteAddr().String()).
|
||||
Int("session", id).Logger()
|
||||
logger.Info().Msg("Starting SMTP session")
|
||||
expConnectsCurrent.Add(1)
|
||||
|
||||
Reference in New Issue
Block a user