Closed dbdr closed 9 years ago
The info is important for embedded JBIG2-compressed images. As you mentioned, it's not necessarily an issue in standalone files. As the main use-case for the plugin is the JBIG2Decode
filtering in PDFs it is important. In the most logging systems you can set filters on classes, packages etc. My suggestion is to configure your logging system to ignore INFO
messages at a reasonable scope.
Thanks for your answer, and sorry if I wasn't clear: the issue is not just for standalone images. For instance, the pdfbox library handles globals by concatenating them before the image content, so they work fine but you still get the INFO log entries even though it's irrelevant in that case. Configuring the logging system is fine if you are the end user, but I'm not sure it's a good idea when writing a library (for instance, the end user might replace the configuration with their own), and it's unreasonable to ask all end users to hide specific messages.
I agree it's important to log missing globals, but that is already done anyway when they are actually found to be missing. I just added a second commit to give more information in that log entry. Does this help?
I don't find this a helpful log message -- is there actually something different PDFBox could do to prevent my log from being spammed while processing PDFs with embedded JBIGs? They say no, that this is really a bug in jbig2-imageio: https://issues.apache.org/jira/browse/PDFBOX-2594
This is simply an INFO-level message. Most logging frameworks support filtering to suppress special messages.
By the way, the pull-request was accepted and merged. Any problems with the DEBUG-level anyway?
All I know is that we now have two libraries who are each saying it's the other person's fault.
Is there anything I miss in this discussion?
The pull-request was merged. The log level is on debug instead of info. In turn, end-user problems should be fixed by that.
jbig2-imageio currently logs a message at level info when globals are not set. The issue with this is that it's not necessarily an issue not to set them, in particular if they are passed as part of the image stream, but the info level is printed by default, leading to undesirable noise. When the globals are actually missing there will be another log entry: "SEVERE: No global segment added so far.". Therefore this pull request reduces the log level for this message.