blob: baae70dd81021f054961aadb113e96527d1330c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package org.uic.barcode.logger;
import java.util.logging.Level;
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);
if (consoleLog) {
System.out.println(text);
}
}
public void log(Level level,String text){
java.util.logging.Logger.getGlobal().log(level,text);
}
public void info(String text, IllegalArgumentException e) {
java.util.logging.Logger.getGlobal().log(Level.INFO,text);
}
public void activateConsoleLog(boolean consoleLogActive) {
this.consoleLog = consoleLogActive;
}
}
|