@@ -402,25 +402,25 @@ botService.executeBots = function executeBots(botsId, reqBody, userName, executi
402402 //logger.info("Executing BOTs Deatails", bots[0].execution[0].os, bots[0].execution[0].type);
403403 masterUtil . getBotRemoteServerDetailByOrgId ( bots [ 0 ] . orgId , function ( err , botServerDetails ) {
404404 if ( err ) {
405- logger . error ( "Error while fetching BOTs Server Details" ) ;
405+ logger . error ( "Error while fetching BOTs Server Details " + "task_id" + taskId ) ;
406406 callback ( err , null ) ;
407407 return ;
408408
409409 } else if ( botServerDetails !== null && botServerDetails . length > 0 ) {
410- logger . info ( "Checking flag status--->" , appConfig . enableBotExecuterOsCheck )
410+ logger . info ( "task_id" + taskId + " Checking flag status--->", appConfig . enableBotExecuterOsCheck )
411411 if ( bots [ 0 ] . type === 'blueprints' ) {
412412 botRemoteServerDetails . hostIP = botServerDetails [ 0 ] . hostIP ;
413413 botRemoteServerDetails . hostPort = botServerDetails [ 0 ] . hostPort ;
414414 } else {
415415 //As env variable will always be in string changed the check value to string
416416 if ( appConfig . enableBotExecuterOsCheck === true || process . env . enableBotExecuterOsCheck === 'true' ) {
417- logger . info ( "Inn OS check condition" ) ;
417+ logger . info ( "task_id" + taskId + " Inn OS check condition") ;
418418 executorOsTypeConditionCheck ( botServerDetails , botRemoteServerDetails , bots ) ;
419419 } else {
420420
421421 botRemoteServerDetails . hostIP = botServerDetails [ 0 ] . hostIP ;
422422 botRemoteServerDetails . hostPort = botServerDetails [ 0 ] . hostPort ;
423- logger . info ( "Default Details as working without Multiple executor feature" , botRemoteServerDetails . hostIP , botRemoteServerDetails . hostPort ) ;
423+ logger . info ( "task_id" + taskId + " Default Details as working without Multiple executor feature", botRemoteServerDetails . hostIP , botRemoteServerDetails . hostPort ) ;
424424 }
425425 }
426426 encryptedParam ( reqBody , next ) ;
@@ -451,15 +451,15 @@ botService.executeBots = function executeBots(botsId, reqBody, userName, executi
451451 if ( reqBody . nodeIds ) {
452452 botObj . params . nodeIds = reqBody . nodeIds ;
453453 }
454- logger . info ( "Updating bot details" + JSON . stringify ( botObj ) ) ;
454+ logger . info ( "task_id" + taskId + " Updating bot details" + JSON . stringify ( botObj ) ) ;
455455 botDao . updateBotsDetail ( botId , botObj , next ) ;
456456 } ,
457457 function ( updateStatus , next ) {
458458 botDao . getBotsById ( botId , next ) ;
459459 } ,
460460 function ( botDetails , next ) {
461461 if ( botDetails . length > 0 ) {
462- logger . info ( "Executor in parallel " + JSON . stringify ( botDetails ) ) ;
462+ logger . info ( "task_id" + taskId + " Executor in parallel " + JSON . stringify ( botDetails ) ) ;
463463 async . parallel ( {
464464 executor : function ( callback ) {
465465 async . waterfall ( [
@@ -522,6 +522,7 @@ botService.executeBots = function executeBots(botsId, reqBody, userName, executi
522522 jenkinsExecutor . execute ( botDetails [ 0 ] , auditTrail , reqBody , userName , next ) ;
523523 } else {
524524 var err = new Error ( 'Invalid BOT Type' ) ;
525+ logger . error ( "Error: Invalid BOT Type " + "task_id" + taskId )
525526 err . status = 400 ;
526527 err . msg = 'Invalid BOT Type' ;
527528 callback ( err , null ) ;
@@ -547,7 +548,7 @@ botService.executeBots = function executeBots(botsId, reqBody, userName, executi
547548 botDao . updateBotsDetail ( botId , botUpdateObj , callback ) ;
548549 } else {
549550 var err = new Error ( 'Invalid BOT Type' ) ;
550- logger . error ( "task_id" + taskId + " Invalid BOT Type" )
551+ logger . error ( "Error: Invalid BOT Type " + "task_id" + taskId )
551552 err . status = 400 ;
552553 err . msg = 'Invalid BOT Type' ;
553554 callback ( err , null ) ;
@@ -561,7 +562,7 @@ botService.executeBots = function executeBots(botsId, reqBody, userName, executi
561562 }
562563 } ) ;
563564 } else {
564- logger . info ( " No Botdetails found ") ;
565+ logger . error ( "Error: No Botdetails found "+ "task_id" + taskId ) ;
565566 next ( null , botDetails ) ;
566567 }
567568 }
@@ -571,7 +572,7 @@ botService.executeBots = function executeBots(botsId, reqBody, userName, executi
571572 callback ( err , null ) ;
572573 return ;
573574 } else {
574- logger . info ( "Completed Bot execution " + JSON . stringify ( results ) ) ;
575+ logger . info ( "task_id" + taskId + " Completed Bot execution " + JSON . stringify ( results ) ) ;
575576 callback ( null , results ) ;
576577 return ;
577578 }
0 commit comments