1 23 24 package org.objectweb.dream.control.lifecycle; 25 26 import org.objectweb.dream.control.logger.Loggable; 27 import org.objectweb.dream.control.logger.LoggerController; 28 import org.objectweb.dream.control.logger.LoggerControllerRegister; 29 import org.objectweb.dream.util.NullLogger; 30 import org.objectweb.fractal.api.factory.InstantiationException; 31 import org.objectweb.fractal.julia.InitializationContext; 32 import org.objectweb.util.monolog.api.Logger; 33 34 45 public abstract class LoggableLifeCycleMixin implements Loggable 46 { 47 48 49 public Logger weaveableLCCLogger; 50 51 54 public void initFcController(final InitializationContext ic) 55 throws InstantiationException 56 { 57 _super_initFcController(ic); 58 59 weaveableLCCLogger = NullLogger.NULL_LOGGER; 61 if (_this_weaveableOptLogC != null) 63 { 64 ((LoggerControllerRegister) _this_weaveableOptLogC).register( 65 "life-cycle", (Loggable) this); 66 } 67 } 68 69 72 public void setLogger(String name, Logger logger) 73 { 74 if ("life-cycle".equals(name)) 75 { 76 weaveableLCCLogger = logger; 77 } 78 } 79 80 84 89 public LoggerController _this_weaveableOptLogC; 90 91 98 public abstract void _super_initFcController(InitializationContext ic) 99 throws InstantiationException ; 100 101 } | Popular Tags |