Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5807

JPEGFactory. Reduce logging severity when no image metadata is present

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.31, 3.0.2 PDFBox
    • 2.0.32, 3.0.3 PDFBox, 4.0.0
    • FontBox
    • None

    Description

      Currently when the image size cannot retrieved from metadata we issue:

      LOG.warn("No image metadata, will decode image and use raster size"); 
      

      and

      LOG.warn("Error reading image metadata, will decode image and use raster size", ex);

      both at the warn level, but since these are recoverable errors (by using the raster size, as the messages indicate), I think their log priority should be reduced to info or debug. This is particularly important in the second message since it actually prints the full stack trace, which heavily pollutes log files.

      I use JPEGFactory inside a server side application without control from which files the user uploads, and these stack traces are useless and distracting.
      Thank you.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            moraleda Jorge moraleda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment