@@ -117,10 +117,8 @@ export class Counters extends EventEmitter {
117
117
118
118
private startTimer ( ) : void {
119
119
if ( this . disabled || this . getInterval ( ) === 0 ) {
120
- console . log ( 'counters was disabled' ) ;
121
120
return ;
122
121
}
123
- console . log ( 'Starting timer' ) ;
124
122
this . timer = setTimeout ( ( ) => {
125
123
this . sendCounters ( ) ;
126
124
} , this . getInterval ( ) ) ;
@@ -157,7 +155,6 @@ export class Counters extends EventEmitter {
157
155
UnleashEvents . Warn ,
158
156
`${ url } returning ${ statusCode } . Backing off to ${ this . failures } times normal interval` ,
159
157
) ;
160
- console . log ( 'Failed. Backing off' ) ;
161
158
this . startTimer ( ) ;
162
159
}
163
160
@@ -183,7 +180,6 @@ export class Counters extends EventEmitter {
183
180
const payload = this . createCounterData ( ) ;
184
181
185
182
const headers = this . customHeadersFunction ? await this . customHeadersFunction ( ) : this . headers ;
186
- console . log ( `Posting counters for ${ url } ` ) ;
187
183
try {
188
184
const res = await post ( {
189
185
url,
@@ -204,11 +200,10 @@ export class Counters extends EventEmitter {
204
200
res . status === 504
205
201
) {
206
202
this . backoff ( url , res . status ) ;
207
- } else {
208
- console . log ( 'Successfully sent payload. Calling reduce backoff' ) ;
209
- this . emit ( UnleashEvents . Sent , payload ) ;
210
- this . reduceBackoff ( ) ;
211
203
}
204
+ } else {
205
+ this . emit ( UnleashEvents . Sent , payload ) ;
206
+ this . reduceBackoff ( ) ;
212
207
}
213
208
} catch ( err ) {
214
209
this . emit ( UnleashEvents . Warn , err ) ;
@@ -217,7 +212,6 @@ export class Counters extends EventEmitter {
217
212
}
218
213
219
214
reduceBackoff ( ) : void {
220
- console . log ( `Reducing backoff... Failures now ${ this . getFailures ( ) } ` ) ;
221
215
this . failures = Math . max ( 0 , this . failures - 1 ) ;
222
216
this . startTimer ( ) ;
223
217
}
0 commit comments