File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/org/uu/nl/net2apl/core/logging Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,21 @@ public void log(Class<?> c, Object message) {
3232 * @param ex The exception to log
3333 */
3434 public void log (Class <?> c , Exception ex ) {
35+ log (c , Level .SEVERE , ex );
36+ }
37+
38+ /**
39+ * Shorthand method for logging an exception with a custom severity level.
40+ * @param c The class that generated the message
41+ * @param level Severity of exception
42+ * @param ex The exception to log
43+ */
44+ public void log (Class <?> c , Level level , Exception ex ) {
3545 String msg = ex .getMessage () == null ? "<No Message>" : ex .getMessage ();
36- log (c , Level . SEVERE , msg );
46+ log (c , level , msg );
3747 if (ex .getStackTrace () != null ) {
3848 for (StackTraceElement el : ex .getStackTrace ()) {
39- log (c , Level . SEVERE , "\t | " + el .toString ());
49+ log (c , level , "\t | " + el .toString ());
4050 }
4151 }
4252 }
You can’t perform that action at this time.
0 commit comments