1 package org.objectweb.jonathan.libs.resources; 2 3 import org.objectweb.jonathan.apis.kernel.Context; 4 import org.objectweb.jonathan.libs.helpers.LogConfiguration; 5 import org.objectweb.util.monolog.api.Logger; 6 7 class LoggerProvider { 8 static Logger logger = null; 9 static Logger bind_logger = null; 10 static Logger export_logger = null; 11 static Logger send_logger = null; 12 static Logger receive_logger = null; 13 14 static { 15 try { 16 Context trace_context = LogConfiguration.newConfiguration(LoggerProvider.class); 17 String package_name = "org.objectweb.jonathan.libs.resources"; 18 Object component = trace_context.getValue("packages." + package_name + ".generic logger",'.'); 19 if (component instanceof Logger) logger = (Logger) component; 20 component = trace_context.getValue("packages." + package_name + ".bind logger",'.'); 21 if (component instanceof Logger) bind_logger = (Logger) component; 22 component = trace_context.getValue("packages." + package_name + ".export logger",'.'); 23 if (component instanceof Logger) export_logger = (Logger) component; 24 component = trace_context.getValue("packages." + package_name + ".send logger",'.'); 25 if (component instanceof Logger) send_logger = (Logger) component; 26 component = trace_context.getValue("packages." + package_name + ".receive logger",'.'); 27 if (component instanceof Logger) receive_logger = (Logger) component; 28 } catch (Exception e) {} 29 } 30 } 31 | Popular Tags |