@@ -69,11 +69,11 @@ export class DefaultEventQueue implements IEventQueue {
6969 this . ensureQueueTimer ( ) ;
7070
7171 const timestamp = config . services . storage . queue . save ( event ) ;
72- const logText = `type=${ event . type } ${ event . reference_id ? "refid=" + event . reference_id : "" } ` ;
72+ const logText = `type=${ event . type } ${ event . reference_id ? "refid=" + event . reference_id : "" } source= ${ event . source } message= ${ event . message } ` ;
7373 if ( timestamp ) {
7474 log . info ( `Enqueuing event: ${ timestamp } ${ logText } ` ) ;
7575 } else {
76- log . error ( `Could not enqueue event ${ logText } ` ) ;
76+ log . error ( `Could not enqueue event: ${ logText } ` ) ;
7777 }
7878 }
7979
@@ -86,7 +86,7 @@ export class DefaultEventQueue implements IEventQueue {
8686 return ;
8787 }
8888
89- log . info ( "Processing queue..." ) ;
89+ log . trace ( "Processing queue..." ) ;
9090 if ( ! this . config . enabled ) {
9191 log . info ( `Configuration is disabled: ${ queueNotProcessed } ` ) ;
9292 return ;
@@ -111,7 +111,7 @@ export class DefaultEventQueue implements IEventQueue {
111111 const response = await this . config . services . submissionClient . submitEvents ( events . map ( ( e ) => e . value ) ) ;
112112 this . processSubmissionResponse ( response , events ) ;
113113 this . eventsPosted ( events . map ( ( e ) => e . value ) , response ) ;
114- log . info ( "Finished processing queue." ) ;
114+ log . trace ( "Finished processing queue." ) ;
115115 this . _processingQueue = false ;
116116 } catch ( ex ) {
117117 log . error ( `Error processing queue: ${ ex } ` ) ;
@@ -194,32 +194,28 @@ export class DefaultEventQueue implements IEventQueue {
194194 const log : ILog = config . services . log ; // Optimization for minifier.
195195
196196 if ( response . status === 202 ) {
197- log . info ( `Sent ${ events . length } events. ` ) ;
197+ log . info ( `Sent ${ events . length } events` ) ;
198198 this . removeEvents ( events ) ;
199199 return ;
200200 }
201201
202202 if ( response . status === 429 || response . rateLimitRemaining === 0 || response . status === 503 ) {
203203 // You are currently over your rate limit or the servers are under stress.
204- log . error ( "Server returned service unavailable. " ) ;
204+ log . error ( "Server returned service unavailable" ) ;
205205 this . suspendProcessing ( ) ;
206206 return ;
207207 }
208208
209209 if ( response . status === 402 ) {
210210 // If the organization over the rate limit then discard the event.
211- log . info (
212- "Too many events have been submitted, please upgrade your plan." ,
213- ) ;
211+ log . info ( "Too many events have been submitted, please upgrade your plan" ) ;
214212 this . suspendProcessing ( null , true , true ) ;
215213 return ;
216214 }
217215
218216 if ( response . status === 401 || response . status === 403 ) {
219217 // The api key was suspended or could not be authorized.
220- log . info (
221- `Unable to authenticate, please check your configuration. ${ noSubmission } ` ,
222- ) ;
218+ log . info ( `Unable to authenticate, please check your configuration. ${ noSubmission } ` ) ;
223219 this . suspendProcessing ( 15 ) ;
224220 this . removeEvents ( events ) ;
225221 return ;
0 commit comments