@@ -280,21 +280,13 @@ class ActionRunner {
280280 }
281281
282282 this . logger . info ( `Running workflow ${ RUN_SCRIPT_WORKFLOW_ID } (vRO ${ this . vroVersion } )` )
283- const supportsSysLog = semver . gt ( this . vroVersion , "7.3.1" )
284283 const params = [
285284 {
286285 name : "script" ,
287286 type : "string" ,
288287 value : {
289288 string : { value : fileContent }
290289 }
291- } ,
292- {
293- name : "printInOutput" ,
294- type : "boolean" ,
295- value : {
296- boolean : { value : ! supportsSysLog }
297- }
298290 }
299291 ]
300292
@@ -416,11 +408,15 @@ abstract class FetchSysLogsStrategy extends FetchLogsStrategy {
416408 protected abstract getLogMessages ( ) : Promise < LogMessage [ ] >
417409
418410 async printMessages ( ) : Promise < void > {
411+ if ( Logger . level === "off" ) {
412+ return
413+ }
419414 const timestamp = Date . now ( ) - 10000 // 10sec earlier
420415 const logs = await this . getLogMessages ( )
421416 logs . forEach ( logMessage => {
422417 const timestamp = moment ( logMessage . timestamp ) . format ( "YYYY-MM-DD HH:mm:ss.SSS ZZ" )
423- const msg = `[${ timestamp } ] [${ logMessage . severity } ] ${ logMessage . description } `
418+ const origin = ! logMessage . origin ? "" : `[${ logMessage . origin } ] `
419+ const msg = `[${ timestamp } ] ${ origin } [${ logMessage . severity } ] ${ logMessage . description } `
424420 if ( ! this . printedMessages . has ( msg ) ) {
425421 this . log ( msg )
426422 this . printedMessages . add ( msg )
@@ -455,7 +451,7 @@ class FetchLogsPre76 extends FetchSysLogsStrategy {
455451 return this . restClient . getWorkflowLogsPre76 (
456452 RUN_SCRIPT_WORKFLOW_ID ,
457453 this . executionToken ,
458- "debug" ,
454+ Logger . level ,
459455 this . lastTimestamp
460456 )
461457 }
@@ -475,7 +471,7 @@ class FetchLogsPost76 extends FetchSysLogsStrategy {
475471 return this . restClient . getWorkflowLogsPost76 (
476472 RUN_SCRIPT_WORKFLOW_ID ,
477473 this . executionToken ,
478- "debug" ,
474+ Logger . level ,
479475 this . lastTimestamp
480476 )
481477 }
0 commit comments