3 import mir.config.MirPropertiesConfiguration;
\r
4 import mir.config.MirPropertiesConfiguration.PropertiesConfigExc;
\r
8 private static Logger myLogger;
\r
12 String loggerClass = MirPropertiesConfiguration.instance().getString("Log.LogClass");
\r
13 myLogger = (Logger) Class.forName(loggerClass).newInstance();
\r
15 catch (java.lang.ClassNotFoundException cnfe) {
\r
16 System.err.println("Log was not able to initialize: class not found");
\r
17 cnfe.printStackTrace(System.err);
\r
19 catch (java.lang.InstantiationException ie) {
\r
21 "Log was not able to initialize: could not initialize class");
\r
22 ie.printStackTrace(System.err);
\r
24 catch (java.lang.IllegalAccessException iae) {
\r
25 System.err.println("Log was not able to initialize: illegal access");
\r
26 iae.printStackTrace(System.err);
\r
28 catch (PropertiesConfigExc e) {
\r
29 e.printStackTrace(System.err);
\r
33 public static void debug(Object o, String s) {
\r
34 myLogger.debug(o, s);
\r
37 public static void info(Object o, String s) {
\r
38 myLogger.info(o, s);
\r
41 public static void warn(Object o, String s) {
\r
42 myLogger.warn(o, s);
\r
45 public static void error(Object o, String s) {
\r
46 myLogger.error(o, s);
\r
49 public static void fatal(Object o, String s) {
\r
50 myLogger.fatal(o, s);
\r