Proposal: Quick-Logging Approach #129
Labels
area/tooling
Relates to tooling around Quick, e.g. justfile
type/design
Design documents for enhancements
Milestone
Synopsis
At the time of writing, there are 152 log statements in Quick. Some are ok, but some are superfluous (either not informative, lacking context, or duplicated). Furthermore, logging levels are not used consistently.
Concrete plan for changes
Log levels
INFO
I perceive log.info as a piece of info for the user. They want to know on a high level what happens, but, for example, when they make a query, they are only concerned about the answer and not that the request was rerouted because of a problem.
DEBUG
Additional context
TRACE
Extra info for detailed debugging
Duplicated
It'd be good to decide whether we want to log twice at different service levels (see (5) in the Logging guideline above). Furthermore, determine if we log at the callee or caller level. Logging twice in the same class at both the callee and caller level doesn't broaden the understanding of what happens (see
KafkaTopicService
regarding the topic creation).Missing log statements
Concerning missing log statements, I would only add
info
statements for now. Regardingdebug
andtrace
, I would add them on demand.Components
Manager
info
level. Currently, some of these activities aredebug
, some areinfo
, and some are not logged at all). Such log statements should contain some context info, f.e. a topic name.debug
level. Whether we need trace there could be discussed.Mirror
Mirror uses quite an extensive logging, which is fine. Numerous intern things are on debug, which is also acceptable.
To discuss:
MirrorController's
getRange
function logs:"Request for key {} and range from {} to {}", keyString, from, to
and then callsKafkaQueryService.getRange()
, where the same info might be logged again."Record value of type Avro Generic Record"
has the trace level, shouldn't"Type Avro detected"
also be logged at trace and not debug? Seems like an additional, detailed piece of info that is supposed to help with meticulous debugging.Ingest
Common
I would put all routing info to the debug level.
Gateway
The text was updated successfully, but these errors were encountered: