You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🎨 Logging: allow writer in env, remove log_by_{args,buf}
Problem:
- The writer has to be supplied in the log config; there are use cases for
changing the writer in the environment. For instance this would provide an
alternative, more flexible way to do secure logging.
- The hardcoded dichotomy between `log_by_args` and `log_by_buf` is annoying and
a relic of the original implementation.
Solution:
- Allow the log writer to be passed in the log environment.
- Instead of `log_by_args` and `log_by_buf`, a writer should provide a function
that takes the span to write. Now the callee can choose whether to make that a
function template and potentially unroll the write loop, or just a function
taking a dynamic span with a runtime loop.
0 commit comments