comparison src/goodjava/logger/Level.java @ 1448:6fc083e1d08c

start logger
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 23 Feb 2020 18:14:32 -0700
parents
children dd14d2dce7ee
comparison
equal deleted inserted replaced
1447:851b9a48cc44 1448:6fc083e1d08c
1 package goodjava.logger;
2
3
4 final class Level {
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 }