v1.3.1 : Optimizing logging levels
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
# Simple Logger
|
# Simple Logger
|
||||||
A simple but useful Java logger to use everywhere.
|
A simple but useful Java logger to use everywhere.
|
||||||
|
|
||||||
Current version v1.3
|
Current version v1.3.1
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
* [simple-logger-1.3.jar](../../raw/master/download/simple-logger-1.3.jar)
|
* [simple-logger-1.3.1.jar](../../raw/master/download/simple-logger-1.3.1.jar)
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ You can use this project as a maven dependency with this :
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>fr.klemek</groupId>
|
<groupId>fr.klemek</groupId>
|
||||||
<artifactId>simple-logger</artifactId>
|
<artifactId>simple-logger</artifactId>
|
||||||
<version>1.2.1</version>
|
<version>1.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
```
|
```
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>fr.klemek</groupId>
|
<groupId>fr.klemek</groupId>
|
||||||
<artifactId>simple-logger</artifactId>
|
<artifactId>simple-logger</artifactId>
|
||||||
<version>1.3</version>
|
<version>1.3.1</version>
|
||||||
|
|
||||||
<name>SimpleLogger</name>
|
<name>SimpleLogger</name>
|
||||||
|
|
||||||
|
|||||||
@@ -169,6 +169,8 @@ public final class Logger {
|
|||||||
initialized = true;
|
initialized = true;
|
||||||
Logger.log(Level.WARNING, "Logger was not initialized please do so before using.");
|
Logger.log(Level.WARNING, "Logger was not initialized please do so before using.");
|
||||||
}
|
}
|
||||||
|
if (lvl.intValue() < appLogger.getLevel().intValue())
|
||||||
|
return;
|
||||||
message = String.format("[%s-%s] %s", appName, Utils.getCallingClassName(depth), message);
|
message = String.format("[%s-%s] %s", appName, Utils.getCallingClassName(depth), message);
|
||||||
appLogger.log(lvl, message, objects);
|
appLogger.log(lvl, message, objects);
|
||||||
if (objects.length > 0 && objects[0] instanceof Throwable) {
|
if (objects.length > 0 && objects[0] instanceof Throwable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user