when it isn't. I'm building a Go project that will, possibly across
different machines, deliver HTTP requests, perform out-of-band work, and
manage long-running connections. These tasks will be performed
concurrently, and it would be immensely useful for debugging or auditing to
build a logging framework that noted what role + task is being performed in
its standard prefix.
In other languages, each thread would have a context (and therefore
logger), which would be propagated by default in new threads. This doesn't
seem possible in Go. I understand that I could require every class in the
entire codebase to contain a pointer to a logger which gets passed around,
but that's a fairly straw-man argument. Forcing every developer in the
codebase to manually bootstrap their way into logging conventions is
madness.
What reasonable options do I have, where I can lay the foundations for the
codebase so that future developers can use the logging library without
being intimately familiar with the implementation?
Thanks,
Thomas
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.