All challenges
Multiple ChoiceBeginner 45s

Cross-cutting logging

Why is logging often implemented as a cross-cutting concern via middleware/decorators rather than sprinkled in each method?
Options
  1. 1It centralizes format/context/correlation and avoids duplicating logic and coupling domain code to a logger
  2. 2Because scattering logging statements throughout the codebase is explicitly banned by regulation
  3. 3Because logger instances simply cannot be invoked from inside ordinary methods of a class
  4. 4Because middleware-based logging executes significantly faster than ordinary inline function calls

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle