File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,15 @@ export class Octokit {
7575
7676 this . request = request . defaults ( requestDefaults ) ;
7777 this . graphql = withCustomRequest ( this . request ) . defaults ( requestDefaults ) ;
78+ this . log = Object . assign (
79+ {
80+ debug : ( ) => { } ,
81+ info : ( ) => { } ,
82+ warn : console . warn . bind ( console ) ,
83+ error : console . error . bind ( console )
84+ } ,
85+ options . log
86+ ) ;
7887 this . hook = hook ;
7988
8089 // apply plugins
@@ -86,6 +95,13 @@ export class Octokit {
8695 // assigned during constructor
8796 request : typeof request ;
8897 graphql : typeof graphql ;
98+ log : {
99+ debug : ( message : string , additionalInfo ?: object ) => any ;
100+ info : ( message : string , additionalInfo ?: object ) => any ;
101+ warn : ( message : string , additionalInfo ?: object ) => any ;
102+ error : ( message : string , additionalInfo ?: object ) => any ;
103+ [ key : string ] : any ;
104+ } ;
89105 hook : HookCollection ;
90106
91107 // allow for plugins to extend the Octokit instance
You can’t perform that action at this time.
0 commit comments