mirror of
https://github.com/juanfont/headscale.git
synced 2026-08-22 07:03:47 +09:00
4f8724151e
Replace the helper functions (logf, infof, tracef, errf) with a zerolog sub-logger initialized in newMapSession(). The sub-logger is pre-populated with session context (component, node, omitPeers, stream) eliminating repeated field calls throughout the code. Changes: - Add log field to mapSession struct - Initialize sub-logger with EmbedObject(node) and request context - Remove logf/infof/tracef/errf helper functions - Update all callers to use m.log.Level().Caller()... pattern - Update noise.go to use sess.log instead of sess.tracef This reduces code by ~20 lines and eliminates ~15 repeated field calls per log statement.