mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-23 17:18:50 +02:00
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.
9.6 KiB
9.6 KiB