Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1660

Improve handling of output to PowerShell channels

    XMLWordPrintable

Details

    Description

      Current Situation

      • Output Handling
        • Any output created by cmdlets Echo, Write-Output, Write-Verbose, Write-Debug, Write-Warning is written to individual output streams.
        • The PowerShell processor reads streams per output channel and therefore writes output to the log in the sequence:
          • all output to stdout
          • all verbose output
          • all debug output
          • all warning output
          • all output to stderr
        • This behavior does not reproduce the exact sequence in which such output has been created.
      • Only the first line of output created by the Write-Verbose cmdlet is added to the log.
      • Output is added to the task log only. No output is added to the order log.

      Desired Behavior

      • Output Handling
        • The output handling is improved
          • all output by Echo and Write-Output cmdlets is forwarded to spooler_log.info()
          • all output by Write-Verbose is forwarded to spooler_log.debug()
          • all output by Write-Debug is forwarded to spooler_log.debug3()
          • all output by Write-Warning is forwarded to spooler_log.warn()
          • all output by Write-Error is forwarded to stderr (unchanged).
        • The sequence of occurrence of lines of output is considered by the log.
      • All output created by Write-Verbose is added to the log.
      • All output is available with the task log and the order log.

      Workaround

      • Users can use the above-mentioned JobScheduler methods instead of using PowerShell cmdlets to force the correct sequence of occurrence in the log.
        • $spooler_log.info( "some information" ) for output to stdout
        • $spooler_log.debug( "some verbose output" ) for verbose output that is visible depending on the job debug settings
        • $spooler_log.debug3( "some debug output" ) for debug output this is visible with higher debug level settings
        • $spooler_log.warn( "some warning" ) for warnings
        • $spooler_log.error( "some error" ) for errors that are logged and that result in failed execution of the job

      Attachments

        Issue Links

          Activity

            People

              re Robert Ehrlich
              ap Andreas Püschel
              Uwe Risse Uwe Risse (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: