Commit Graph

3 Commits

Author SHA1 Message Date
Brian Picciano
8368d0881b mlog: change how Merge/MergeInto work, so they don't evaluate the KV immediately 2018-07-19 18:43:17 +00:00
Brian Picciano
15efa4ba3a mlog: refactor to handle certain use cases better, and make KV merging more consistent
Logger is now initialized with its WriteCloser (which can never change
after initialization) and then has its properties modified via method
calls. These method calls return new copies of the Logger, all writing
to the same original WriteCloser still. This allows for doing things
like having a Logger within some entity that has its own KV, for
example.

Also I revamped the merging code a bit, and fixed a precedence
inconsitency in ErrWithKV and CtxWithKV.
2018-05-28 07:53:39 +00:00
Brian Picciano
0b9c02c62a implement mlog logging system, which also implements functionality for embedding KV logging data in contexts and errors 2018-02-04 17:01:21 +00:00