import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.text.MessageFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
private static final String HASH_ALIGNBALOON = "alignBaloonWidth";
private static final String HASH_PROXY = "proxy";
+ private static final String MSG_NOIMG =
+ "画像ファイル{0}が読み込めないため"
+ + "{1}の表示に代替イメージを使います。";
+
private static final Logger LOGGER = Logger.getAnonymousLogger();
|| ! file.exists()
|| ! file.isFile()
|| ! file.canRead() ){
- LOGGER.info("failed to access local image " + file.getPath());
+ String msg = MessageFormat.format(
+ MSG_NOIMG, file.getPath(), avatarId
+ );
+ LOGGER.info(msg);
continue;
}
try {
image = ImageIO.read(file);
}catch(IOException e){
- LOGGER.info("failed to load local image " + file.getPath());
+ String msg = MessageFormat.format(
+ MSG_NOIMG, file.getPath(), avatarId
+ );
+ LOGGER.info(msg);
continue;
}