# HG changeset patch # User František Kučera # Date 1416244439 -3600 # Node ID a5a723467a3937140e3d6c774ba7177bfc6b0276 # Parent 00d15f596bced99bbb9c881df2dace3700c62785 logging, imports, constants diff -r 00d15f596bce -r a5a723467a39 java/copy-image-resizer/src/cz/frantovo/copyImageResizer/Constants.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/copy-image-resizer/src/cz/frantovo/copyImageResizer/Constants.java Mon Nov 17 18:13:59 2014 +0100 @@ -0,0 +1,27 @@ +/** + * copy-image-resizer + * Copyright © 2014 František Kučera (frantovo.cz) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package cz.frantovo.copyImageResizer; + +/** + * + * @author Ing. František Kučera (frantovo.cz) + */ +public class Constants { + + public static final String JAVA_PACKAGE = Constants.class.getPackage().getName(); +} diff -r 00d15f596bce -r a5a723467a39 java/copy-image-resizer/src/cz/frantovo/copyImageResizer/RecursiveImageResizer.java --- a/java/copy-image-resizer/src/cz/frantovo/copyImageResizer/RecursiveImageResizer.java Mon Nov 17 18:12:57 2014 +0100 +++ b/java/copy-image-resizer/src/cz/frantovo/copyImageResizer/RecursiveImageResizer.java Mon Nov 17 18:13:59 2014 +0100 @@ -25,10 +25,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.nio.channels.Channels; import java.nio.channels.FileChannel; -import java.nio.channels.ReadableByteChannel; -import java.nio.channels.WritableByteChannel; import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; @@ -49,12 +46,12 @@ private void resizeFile(File inputFile, RecursiveOptions options) throws ResizeException { File inputFileRelative = relativize(options.getInput(), inputFile); - log.log(Level.FINE, "Resizing file: {0}", inputFileRelative); + log.log(Level.FINER, "Resizing file: {0}", inputFileRelative); ImageFormat format = ImageFormat.getMatching(inputFile.getName()); if (format == null) { - log.log(Level.FINE, "Skipping file: {0} (no image format matched this extension)", inputFileRelative); + log.log(Level.FINER, "Skipping file: {0} (no image format matched this extension)", inputFileRelative); } else { try { for (SizeSpecification size : options.getSizes()) { @@ -67,7 +64,7 @@ resizer.resize(image, output, size, format); } } else { - log.log(Level.INFO, "File: {0} has already required size → just copy", inputFileRelative); + log.log(Level.FINER, "File: {0} has already required size → just copy", inputFileRelative); justCopy(inputFile, outputFile); } } diff -r 00d15f596bce -r a5a723467a39 java/copy-image-resizer/src/cz/frantovo/copyImageResizer/SingleImageResizer.java --- a/java/copy-image-resizer/src/cz/frantovo/copyImageResizer/SingleImageResizer.java Mon Nov 17 18:12:57 2014 +0100 +++ b/java/copy-image-resizer/src/cz/frantovo/copyImageResizer/SingleImageResizer.java Mon Nov 17 18:13:59 2014 +0100 @@ -59,7 +59,7 @@ } if (type == BufferedImage.TYPE_CUSTOM) { - log.log(Level.FINE, "Setting default image type: from TYPE_CUSTOM to TYPE_INT_ARGB"); + log.log(Level.FINER, "Setting default image type: from TYPE_CUSTOM to TYPE_INT_ARGB"); type = BufferedImage.TYPE_INT_ARGB; }