1818 */
1919public class Logger {
2020
21- private Logger () {
22- // Static utility class
21+ public Logger () {
2322 }
2423
25- public static void debug (final Object msg ) {
24+ public void debug (final Object msg ) {
2625 log (DEBUG , msg );
2726 }
2827
29- public static void debug (final Throwable t ) {
28+ public void debug (final Throwable t ) {
3029 log (DEBUG , t );
3130 }
3231
33- public static void debug (final Object msg , final Throwable t ) {
32+ public void debug (final Object msg , final Throwable t ) {
3433 log (DEBUG , msg , t );
3534 }
3635
37- public static void error (final Object msg ) {
36+ public void error (final Object msg ) {
3837 log (ERROR , msg );
3938 }
4039
41- public static void error (final Throwable t ) {
40+ public void error (final Throwable t ) {
4241 log (ERROR , t );
4342 }
4443
45- public static void error (final Object msg , final Throwable t ) {
44+ public void error (final Object msg , final Throwable t ) {
4645 log (ERROR , msg , t );
4746 }
4847
49- public static void info (final Object msg ) {
48+ public void info (final Object msg ) {
5049 log (INFO , msg );
5150 }
5251
53- public static void info (final Throwable t ) {
52+ public void info (final Throwable t ) {
5453 log (INFO , t );
5554 }
5655
57- public static void info (final Object msg , final Throwable t ) {
56+ public void info (final Object msg , final Throwable t ) {
5857 log (INFO , msg , t );
5958 }
6059
61- public static void trace (final Object msg ) {
60+ public void trace (final Object msg ) {
6261 log (TRACE , msg );
6362 }
6463
65- public static void trace (final Throwable t ) {
64+ public void trace (final Throwable t ) {
6665 log (TRACE , t );
6766 }
6867
69- public static void trace (final Object msg , final Throwable t ) {
68+ public void trace (final Object msg , final Throwable t ) {
7069 log (TRACE , msg , t );
7170 }
7271
73- public static void warn (final Object msg ) {
72+ public void warn (final Object msg ) {
7473 log (WARN , msg );
7574 }
7675
77- public static void warn (final Throwable t ) {
76+ public void warn (final Throwable t ) {
7877 log (WARN , t );
7978 }
8079
81- public static void warn (final Object msg , final Throwable t ) {
80+ public void warn (final Object msg , final Throwable t ) {
8281 log (WARN , msg , t );
8382 }
8483
85- public static boolean isDebug () {
84+ public boolean isDebug () {
8685 return isLevel (DEBUG );
8786 }
8887
89- public static boolean isError () {
88+ public boolean isError () {
9089 return isLevel (ERROR );
9190 }
9291
93- public static boolean isInfo () {
92+ public boolean isInfo () {
9493 return isLevel (INFO );
9594 }
9695
97- public static boolean isTrace () {
96+ public boolean isTrace () {
9897 return isLevel (TRACE );
9998 }
10099
101- public static boolean isWarn () {
100+ public boolean isWarn () {
102101 return isLevel (WARN );
103102 }
104103
105- public static boolean isLevel (final int level ) {
104+ public boolean isLevel (final int level ) {
106105 return getLevel () >= level ;
107106 }
108107
@@ -114,7 +113,7 @@ public static boolean isLevel(final int level) {
114113 * is performed.
115114 * @param msg The message to log.
116115 */
117- public static void log (final int level , final Object msg ) {
116+ public void log (final int level , final Object msg ) {
118117 log (level , msg , null );
119118 }
120119
@@ -126,7 +125,7 @@ public static void log(final int level, final Object msg) {
126125 * logging is performed.
127126 * @param t The exception to log.
128127 */
129- public static void log (final int level , final Throwable t ) {
128+ public void log (final int level , final Throwable t ) {
130129 log (level , null , t );
131130 }
132131
@@ -139,7 +138,7 @@ public static void log(final int level, final Throwable t) {
139138 * @param msg The message to log.
140139 * @param t The exception to log.
141140 */
142- public static void log (final int level , final Object msg , final Throwable t ) {
141+ public void log (final int level , final Object msg , final Throwable t ) {
143142 if (isLevel (level )) alwaysLog (level , msg , t );
144143 }
145144
@@ -151,32 +150,32 @@ public static void log(final int level, final Object msg, final Throwable t) {
151150 * @param msg The message to log.
152151 * @param t The exception to log.
153152 */
154- public static void alwaysLog (final int level , final Object msg ,
153+ public void alwaysLog (final int level , final Object msg ,
155154 final Throwable t )
156155 {
157156 throw new UnsupportedOperationException ("not yet implemented" );
158157 }
159158
160159 /** Returns the name of this logger. */
161- public static String getName () {
160+ public String getName () {
162161 return getSource ().name ();
163162 }
164163
165164 /** Returns the {@link LogSource} associated with this logger. */
166- public static LogSource getSource () {
165+ public LogSource getSource () {
167166 throw new UnsupportedOperationException ("not yet implemented" );
168167 }
169168
170169 /** Returns the log level of this logger. see {@link LogLevel} */
171- public static int getLevel () {
170+ public int getLevel () {
172171 throw new UnsupportedOperationException ("not yet implemented" );
173172 }
174173
175174 /**
176175 * Creates a sub logger, that forwards the message it gets to this logger. The
177176 * sub logger will have the same log level as this logger.
178177 */
179- public static Logger subLogger (final String name ) {
178+ public Logger subLogger (final String name ) {
180179 return subLogger (name , getLevel ());
181180 }
182181
@@ -186,7 +185,7 @@ public static Logger subLogger(final String name) {
186185 * @param name The name of the sub logger.
187186 * @param level The log level of the sub logger.
188187 */
189- public static Logger subLogger (final String name , final int level ) {
188+ public Logger subLogger (final String name , final int level ) {
190189 throw new UnsupportedOperationException ("not yet implemented" );
191190 }
192191
0 commit comments