Add a new log
option to createAppAuth(options)
, then replace console.warn
with state.log.warn
#176
Labels
Type: Feature
New feature or request
We are trying to avoid any direct calls to
console
, so that consumers of the Octokit libraries can use their own logging tool. The way we do that is alog
option that is compatible with the globalconsole
object. It should at least set{ debug, info, warn, error }
. By default,{ debug, info }
are no-ops, the other two default toconsole.warn
andconsole.error
respectively. Compare https://github.com/octokit/core.js#logging / https://github.com/octokit/core.js/blob/37437bcf632ce32ba25663e575de96a844b802b2/src/index.ts#L111-L119We introduced
console.warn
statements in #164. These should be replaced with what ever is passed asoptions.log.warn
to thecreateAppAuth
method.I'd happily accept a pull request and will provide guidance if you are interested in contributing. The pull request should add a test (or adjust an existing one), it should implement the feature, and add the new option to the documentation in
README.md
The text was updated successfully, but these errors were encountered: