-package mir.log;
-
-import mir.config.MirPropertiesConfiguration;
-import mir.config.MirPropertiesConfiguration.PropertiesConfigExc;
-
-public class Log {
-
- private static Logger myLogger;
-
- static {
- try {
- String loggerClass =
- MirPropertiesConfiguration.instance().getString("Log.LogClass");
- myLogger = (Logger)Class.forName(loggerClass).newInstance();
- } catch (java.lang.ClassNotFoundException cnfe) {
- System.err.println("Log was not able to initialize: class not found");
- cnfe.printStackTrace(System.err);
- } catch (java.lang.InstantiationException ie) {
- System.err.println("Log was not able to initialize: could not initialize class");
- ie.printStackTrace(System.err);
- } catch (java.lang.IllegalAccessException iae) {
- System.err.println("Log was not able to initialize: illegal access");
- iae.printStackTrace(System.err);
- } catch (PropertiesConfigExc e) {
- e.printStackTrace(System.err);
- }
- }
-
- public static void debug( Object o, String s) {
- myLogger.debug( o, s );
- }
-
- public static void info( Object o, String s) {
- myLogger.info( o, s );
- }
-
- public static void warn( Object o, String s) {
- myLogger.warn( o, s );
- }
-
- public static void error( Object o, String s) {
- myLogger.error( o, s );
- }
-
- public static void fatal( Object o, String s) {
- myLogger.fatal( o, s );
- }
-}
+package mir.log;\r
+\r
+import mir.config.MirPropertiesConfiguration;\r
+import mir.config.MirPropertiesConfiguration.PropertiesConfigExc;\r
+\r
+public class Log {\r
+\r
+ private static Logger myLogger;\r
+\r
+ static {\r
+ try {\r
+ String loggerClass = MirPropertiesConfiguration.instance().getString("Log.LogClass");\r
+ myLogger = (Logger) Class.forName(loggerClass).newInstance();\r
+ }\r
+ catch (java.lang.ClassNotFoundException cnfe) {\r
+ System.err.println("Log was not able to initialize: class not found");\r
+ cnfe.printStackTrace(System.err);\r
+ }\r
+ catch (java.lang.InstantiationException ie) {\r
+ System.err.println(\r
+ "Log was not able to initialize: could not initialize class");\r
+ ie.printStackTrace(System.err);\r
+ }\r
+ catch (java.lang.IllegalAccessException iae) {\r
+ System.err.println("Log was not able to initialize: illegal access");\r
+ iae.printStackTrace(System.err);\r
+ }\r
+ catch (PropertiesConfigExc e) {\r
+ e.printStackTrace(System.err);\r
+ }\r
+ }\r
+\r
+ public static void debug(Object o, String s) {\r
+ myLogger.debug(o, s);\r
+ }\r
+\r
+ public static void info(Object o, String s) {\r
+ myLogger.info(o, s);\r
+ }\r
+\r
+ public static void warn(Object o, String s) {\r
+ myLogger.warn(o, s);\r
+ }\r
+\r
+ public static void error(Object o, String s) {\r
+ myLogger.error(o, s);\r
+ }\r
+\r
+ public static void fatal(Object o, String s) {\r
+ myLogger.fatal(o, s);\r
+ }\r
+}\r