diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-04-13 17:57:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-13 17:57:16 +0200 |
commit | 7a5f15e2b958dca771b83594669401be2b84f2b6 (patch) | |
tree | d96492a7b1958f9822cd994c86d0b0a9f3c6c59f /src/main/java/org/uic/barcode/logger/Logger.java | |
parent | Merge pull request #45 from UnionInternationalCheminsdeFer/1.3.1 (diff) | |
parent | unit test for fcb version 1 including all elements (diff) | |
download | UIC-barcode-7a5f15e2b958dca771b83594669401be2b84f2b6.tar UIC-barcode-7a5f15e2b958dca771b83594669401be2b84f2b6.tar.gz UIC-barcode-7a5f15e2b958dca771b83594669401be2b84f2b6.tar.bz2 UIC-barcode-7a5f15e2b958dca771b83594669401be2b84f2b6.tar.lz UIC-barcode-7a5f15e2b958dca771b83594669401be2b84f2b6.tar.xz UIC-barcode-7a5f15e2b958dca771b83594669401be2b84f2b6.tar.zst UIC-barcode-7a5f15e2b958dca771b83594669401be2b84f2b6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main/java/org/uic/barcode/logger/Logger.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/main/java/org/uic/barcode/logger/Logger.java b/src/main/java/org/uic/barcode/logger/Logger.java index b536154..baae70d 100644 --- a/src/main/java/org/uic/barcode/logger/Logger.java +++ b/src/main/java/org/uic/barcode/logger/Logger.java @@ -3,11 +3,23 @@ package org.uic.barcode.logger; import java.util.logging.Level;
-public class Logger {
+public class Logger {
+
+ private boolean consoleLog = false;
+
+ public Logger(boolean consoleLog) {
+ this.consoleLog = consoleLog;
+ }
+
+ public Logger() {
+ this.consoleLog = false;
+ }
public void debug(String text){
java.util.logging.Logger.getGlobal().log(Level.FINEST,text);
- System.out.println(text);
+ if (consoleLog) {
+ System.out.println(text);
+ }
}
public void log(Level level,String text){
@@ -17,6 +29,10 @@ public class Logger { public void info(String text, IllegalArgumentException e) {
java.util.logging.Logger.getGlobal().log(Level.INFO,text);
}
+
+ public void activateConsoleLog(boolean consoleLogActive) {
+ this.consoleLog = consoleLogActive;
+ }
}
|