1 23 24 package org.objectweb.dream.control.activity.task; 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 LoggableTaskMixin implements Loggable 46 { 47 48 49 public Logger weaveableTCLogger; 50 51 54 public void initFcController(final InitializationContext ic) 55 throws InstantiationException 56 { 57 _super_initFcController(ic); 58 weaveableTCLogger = NullLogger.NULL_LOGGER; 60 if (_this_weaveableOptLogC != null) 62 { 63 ((LoggerControllerRegister) _this_weaveableOptLogC).register( 64 "task-controller", (Loggable) this); 65 } 66 } 67 68 71 public void setLogger(String name, Logger logger) 72 { 73 if ("task".equals(name)) 74 { 75 weaveableTCLogger = logger; 76 } 77 } 78 79 83 88 public LoggerController _this_weaveableOptLogC; 89 90 97 public abstract void _super_initFcController(InitializationContext ic) 98 throws InstantiationException ; 99 100 } | Popular Tags |