rs / xlog

xlog is a logger for net/context aware HTTP applications
MIT License
139 stars 13 forks source link

Clone logger #7

Closed tgulacsi closed 8 years ago

tgulacsi commented 8 years ago

Sometimes I want to clone a logger - set some fields, give this prepared logger in a new context to a subfunction, but don't "pollute" the main logger, to be able to clone again.

I don't see this possible ATM - I don't have the xlog.Config, just xlog.FromContext.

Any idea? Or only a new function (xlog.Clone(xlog.Logger) ?

tgulacsi commented 8 years ago

Perfect, thanks!