rinq / rinq-go

A cross-language command bus and distributed ephemeral data store.
Other
17 stars 1 forks source link

Move all logging and tracing to util modules. #40

Open jmalloc opened 7 years ago

jmalloc commented 7 years ago

Low priority, it just keeps the overly verbose logging code away from the logic so it's easier to follow.

jmalloc commented 6 years ago

@koden-km - notice the title change for this issue.

Rather than just having private log/trace helper functions in each package, I'd like to move these into their own package under rinq/internal/[logutil|traceutil]. This means that all the tracing/logging behaviour will be outside the amqp package, making it easier to provide other implementations in the future (even though that's not a goal at this stage).

All of the logging/tracing should be high-enough level that it doesn't depend on any AMQP knowledge. Note that the tracing stuff I'm talking about refers to the packing of tags/logs into spans, but not the propagation of span contexts across the network which will remain in the AMQP package.

jmalloc commented 6 years ago

All the tracing stuff is already in traceutil, but the logging is still littered around in each package.

koden-km commented 6 years ago

Should logging go in its own logutil package or into the traceutil package?

jmalloc commented 6 years ago

logutil sounds good.