Skip to content

Commit

Permalink
Add getWithLog to Setting
Browse files Browse the repository at this point in the history
  • Loading branch information
looly committed Aug 16, 2014
1 parent 883ec73 commit 2b439e7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/java/com/xiaoleilu/hutool/Setting.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,17 @@ public String getSettingPath() {
* @return 值
*/
public String getWithLog(String key) {
final String value = super.get(key);
return get(key, null);
}

/**
* 带有日志提示的get,如果没有定义指定的KEY,则打印debug日志
*
* @param key 键
* @return 值
*/
public String getWithLog(String key, String group) {
final String value = get(key, group);
if (value == null) {
log.debug("No key define for [{}]!", key);
}
Expand Down

0 comments on commit 2b439e7

Please sign in to comment.