From 9aa8707647299b19d79650876fd4528e36753955 Mon Sep 17 00:00:00 2001 From: sponge Date: Mon, 8 Dec 2008 22:34:45 +0000 Subject: [PATCH] Prepended log LVL to messages, added INFO LVL --- apps/BOB/src/net/i2p/BOB/BOB.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/BOB/src/net/i2p/BOB/BOB.java b/apps/BOB/src/net/i2p/BOB/BOB.java index cd4ccfdcb..c4a4f7539 100644 --- a/apps/BOB/src/net/i2p/BOB/BOB.java +++ b/apps/BOB/src/net/i2p/BOB/BOB.java @@ -115,13 +115,23 @@ public class BOB { private static int maxConnections = 0; private static NamedDB database; + /** + * Log a warning + * + * @param arg + */ + public static void info(String arg) { + System.out.println("INFO:" + arg); + _log.info(arg); + } + /** * Log a warning * * @param arg */ public static void warn(String arg) { - System.out.println(arg); + System.out.println("WARNING:" + arg); _log.warn(arg); } @@ -131,7 +141,7 @@ public class BOB { * @param arg */ public static void error(String arg) { - System.out.println(arg); + System.out.println("ERROR: " + arg); _log.error(arg); } @@ -202,12 +212,12 @@ public class BOB { props.store(fo, configLocation); fo.close(); } catch(IOException ioe) { - warn("IOException on BOB config file " + configLocation + ", " + ioe); + error("IOException on BOB config file " + configLocation + ", " + ioe); } } try { - warn("BOB is now running."); + info("BOB is now running."); ServerSocket listener = new ServerSocket(Integer.parseInt(props.getProperty(PROP_BOB_PORT)), 10, InetAddress.getByName(props.getProperty(PROP_BOB_HOST))); Socket server; @@ -220,7 +230,7 @@ public class BOB { t.start(); } } catch(IOException ioe) { - warn("IOException on socket listen: " + ioe); + error("IOException on socket listen: " + ioe); ioe.printStackTrace(); } }