Skip to content

Delegate stderr should not be directly to identify stderr #316

Open
@crass

Description

Is your feature request related to a problem? Please describe.

When using identify on a PDF file, ghostscript is delegated to. By default the command sends ghostscripts stdout to identify's stderr. The output is confusing and undesirable.

Describe the solution you'd like

In the case above, the output of ghostscript should go to a logging channel named "Delegate". So the output is not shown by default, but can be show by turning on the appropriate logging.

Describe alternatives you've considered

  • In the delegates.xml the output can be send to /dev/null to not show the output, however the user may want to see it for debugging purposes.
  • A command line option could be given that allows delegate output to be sent to a file or file descriptor.
  • Redirect identify's stderr to /dev/null, but then I can't get identify's stderr output.

Additional context

Here's illustrative output:

$ identify test.pdf
   **** Error: /BBox has zero width or height, which is not allowed.
               Output may be incorrect.
   **** Error: /BBox has zero width or height, which is not allowed.
               Output may be incorrect.
   **** Error: /BBox has zero width or height, which is not allowed.
               Output may be incorrect.
   **** Error: /BBox has zero width or height, which is not allowed.
               Output may be incorrect.
   **** Error: /BBox has zero width or height, which is not allowed.
               Output may be incorrect.
   **** Error: /BBox has zero width or height, which is not allowed.
               Output may be incorrect.
test.pdf[0] PDF 432x648 432x648+0+0 16-bit sRGB 53235B 0.100u 0:00.107
test.pdf[1] PDF 432x648 432x648+0+0 16-bit sRGB 46977B 0.100u 0:00.102
test.pdf[2] PDF 432x648 432x648+0+0 16-bit sRGB 48116B 0.090u 0:00.098
test.pdf[3] PDF 432x648 432x648+0+0 16-bit sRGB 46065B 0.090u 0:00.093
test.pdf[4] PDF 432x648 432x648+0+0 16-bit sRGB 50692B 0.080u 0:00.089
test.pdf[5] PDF 432x648 432x648+0+0 16-bit sRGB 49412B 0.080u 0:00.085

The **** Error lines come from ghostscript and there is no way to disable this output without editing delegates.xml or throwing away all of identify's stderr.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions