I like that json
is specific, but I'd prefer something that would be more flexible that wouldn't require bunching up under a single identifier. Also, I like the simplicity of the logger interface in Prolific, a single object to be logged. With the json
property, we'll see it named, and then we'll see properties nested. This is going to encourage more multi-line logging statements, with indentation for the tree structure. Hopefully, $record:
keeps things flat. Also, the selector can be configurable, provided as a function, which could in turn be a regular expression. Assuming that the function gets inlined somehow it shouldn't cost that much more to add this configuration. Using a regex would probably be costly though.