[DEV] remove error of backtrace
This commit is contained in:
parent
52fe5db109
commit
5b6125bec2
@ -163,8 +163,23 @@ public class Logger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static StackTraceElement getCallerElement() {
|
private static StackTraceElement getCallerElement() {
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 5) {
|
||||||
return Thread.currentThread().getStackTrace()[5];
|
return Thread.currentThread().getStackTrace()[5];
|
||||||
}
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 4) {
|
||||||
|
return Thread.currentThread().getStackTrace()[4];
|
||||||
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 3) {
|
||||||
|
return Thread.currentThread().getStackTrace()[3];
|
||||||
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 2) {
|
||||||
|
return Thread.currentThread().getStackTrace()[2];
|
||||||
|
}
|
||||||
|
if (Thread.currentThread().getStackTrace().length > 1) {
|
||||||
|
return Thread.currentThread().getStackTrace()[1];
|
||||||
|
}
|
||||||
|
return Thread.currentThread().getStackTrace()[0];
|
||||||
|
}
|
||||||
|
|
||||||
/** This function permit to get the printable string to print in the log element (select here the number of char to print)
|
/** This function permit to get the printable string to print in the log element (select here the number of char to print)
|
||||||
* @param libName Name of the library
|
* @param libName Name of the library
|
||||||
|
Loading…
x
Reference in New Issue
Block a user