Use of Logging in Java Image Processing libraries
For IMAGING-154 I was trying to think in a solution
for the existing Debug
class. This class was the issue of discussion during a
previous 1.0 release vote thread.
Initially I tried simply changing the class a bit, and make it configurable, so that we could keep it - as there is a valid use case for having a class that collects information during the image processing algorithms were applied.
And for me, the next step would naturally be to remove the use of System.out, as the Debug class
would now have a PrintStream that could be System.out or something else.
That’s when I realized in the current version of Apache Commons Imaging (née Sanselan) uses
System.out when debugging, but also when it wants to enable a
“verbose” mode
in some classes.
I am using this post to collect a few cases, and check what other image processing images are doing with regards to logging.
| Library | Logger |
|---|---|
| Java ImageIO | No logging (exceptions only) |
| im4java | No logging (exceptions only) |
| opencv JNI | No logging (exceptions only) |
| GeoSolutions ImageIO-Ext | java.util.logging |
| Catalano | java.util.logging |
| Apache PDFBox JBIG2 | Custom Logger |
| ImageJ2 | SciJava Logger |
| Fiji | SLF4J + logback |
| OpenJPEG | Custom Logger |
| imgscalar | System.out |
| Apache Commons Imaging | System.out |
| Sanselan | System.out |
| Marvin | System.out |
| Processing | System.out |
Categories: Blog
Tags: Apache Software Foundation, Java, Image Processing, Opensource