Tags: juju/loggo
Tags
Merge pull request #47 from wallyworld/add-log-labels #47 We want to be able to generate log entries with key value labels. We already in loggo have the concept of labels to group logger modules together with a common name. This PR changes that terminology to "tags" and introduces labels as a map of strings which can be attached to logger instances. Each time a logger instance creates a log entry to hand off to the writer, it adds the labels is has to the log entry. To add labels to a logger, use the WithLabels() method. The (now called) tags are included in the labels map with the special key name "logger-tags". This still allows filtering of log entries by tag name like we rely on in places like juju debug-log etc.