improve log messages

This commit is contained in:
Shinsuke Sugaya 2014-10-12 22:50:23 +09:00
parent 114e20f527
commit 01f889c630
3 changed files with 15 additions and 3 deletions

View file

@ -116,10 +116,10 @@ public class DictionaryManager {
synchronized (DictionaryManager.this) {
if (lifetime <= System.currentTimeMillis()
&& dicFileMap != null) {
if (logger.isDebugEnabled()) {
logger.debug("Cleaning synonym files: " + dicFileMap);
}
dicFileMap = null;
if (logger.isDebugEnabled()) {
logger.debug("Clear dictionary cache: " + dicFileMap);
}
}
}
}

View file

@ -397,4 +397,10 @@ public class SynonymFile extends DictionaryFile<SynonymItem> {
StreamUtil.drain(in, file);
reload(null);
}
@Override
public String toString() {
return "SynonymFile [file=" + file + ", synonymItemList="
+ synonymItemList + ", id=" + id + "]";
}
}

View file

@ -324,4 +324,10 @@ public class UserDictFile extends DictionaryFile<UserDictItem> {
StreamUtil.drain(in, file);
reload(null);
}
@Override
public String toString() {
return "UserDictFile [file=" + file + ", userDictItemList="
+ userDictItemList + ", id=" + id + "]";
}
}