make the logCloseLoop() methods members of the Log class

so they can be used everywhere
This commit is contained in:
zab2
2013-09-08 12:55:05 +00:00
parent 78a426e9ac
commit 592680302f
5 changed files with 33 additions and 46 deletions

View File

@ -184,6 +184,34 @@ public class Log {
public boolean shouldLog(int priority) {
return priority >= _minPriority;
}
/**
* logs a loop when closing a resource with level INFO
* @param desc vararg description
*/
public void logCloseLoop(Object... desc) {
logCloseLoop(Log.INFO, desc);
}
/**
* Logs a close loop when closing a resource
* @param desc vararg description of the resource
* @param level level at which to log
*/
public void logCloseLoop(int level, Object... desc) {
if (!shouldLog(level))
return;
// catenate all toString()s
String descString = "close() loop in";
for (Object o : desc) {
descString += " ";
descString += String.valueOf(o);
}
Exception e = new Exception("check stack trace");
log(level,descString,e);
}
public String getName() {
if (_className != null) return _className;