In many environments logging to console is not recommended, and instead a different logging mechanism is used. This may be to provide metadata, or to ensure the logged message conforms to a particular format (e.g. json), etc..
This Pull Request allows a different logging mechanism to optionally be provided. The logging mechanism must conform to the existing interface expected of console; e.g. it must provide an error, warn, and log method.
Defaults to console, which is the existing behaviour.
In many environments logging to console is not recommended, and instead a different logging mechanism is used. This may be to provide metadata, or to ensure the logged message conforms to a particular format (e.g. json), etc..
This Pull Request allows a different logging mechanism to optionally be provided. The logging mechanism must conform to the existing interface expected of
console
; e.g. it must provide anerror
,warn
, andlog
method.Defaults to
console
, which is the existing behaviour.