Open davepacheco opened 7 years ago
I'm waiting on a bunyan ver with the config-and-fields, fields
thing
(https://github.com/trentm/node-bunyan/issues/460) to consider an option
for this.
Note that I've started getting there. I've branch 1.x for maint and #master is now for 2.x work. Mainly it is this config-and-fields, fields
change -- that will allow introducing new config vars for stuff like this -- that is behind the major ver bump.
A lot of times, a component will create multiple instances of some library component, sometimes without even knowing it (via a dependency). It would be useful if the log entries reflected the hierarchy.
For example, we've got a web server called "muskie". It uses an RPC client called "moray" in three different places: via its "marlin" client, its "libmanta" client, and its "medusa" client. It would work pretty well to have the top level have
name: "muskie"
, the next level have something likecomponent: "marlin"
, and the next level would addcomponent: "moray"
.If we just changed "component" to work that way, that'd presumably either be a major version bump or an opt-in option on the top-level logger.