1448
|
1 package goodjava.logger;
|
|
2
|
|
3
|
1449
|
4 public final class Level {
|
1448
|
5 public final static int DEBUG = 0;
|
|
6 public final static int INFO = 1;
|
|
7 public final static int WARN = 2;
|
|
8 public final static int ERROR = 3;
|
|
9 public final static int OFF = 4;
|
|
10
|
|
11 private static final String[] names = {"DEBUG","INFO","WARN","ERROR"};
|
|
12
|
|
13 public static String toString(int level) {
|
|
14 return names[level];
|
|
15 }
|
|
16
|
|
17 private static final String[] paddedNames = {"DEBUG","INFO ","WARN ","ERROR"};
|
|
18
|
|
19 public static String toPaddedString(int level) {
|
|
20 return paddedNames[level];
|
|
21 }
|
|
22
|
|
23 }
|