/** * Constructor. * @param id id of the context. */ public ComponentContext(final String id) { myEnv = new Hashtable<String, Object>(); compId = id; logger = Log.getLogger(Log.JONAS_NAMING_PREFIX); }
/** * Returns the standard PrintWriter associated to the logger defined by * its topic. * This is mainly used for DBM and Connectors. */ public static PrintWriter getLogWriter(final String topic) { // TODO : should not create a new object at each call return new PrintWriterImpl(getLogger(topic), getLoggerFactory()); }
/** * Constructor. * @param id id of the context. * @param env initial environment. */ public ComponentContext(final String id, final Hashtable env) { if (env != null) { // clone env to be able to change it. myEnv = (Hashtable) (env.clone()); } compId = id; logger = Log.getLogger(Log.JONAS_NAMING_PREFIX); }
/** * Set the given log level to the specified logger. * @param loggerName name of the loger to be configured * @param level target level * @return the previous level of the logger */ public static Level setComponentLogLevel(final String loggerName, final Level level) { Logger log = Log.getLogger(loggerName); Level old = log.getCurrentLevel(); log.setLevel(level); return old; }
/** * Construct a reconfigurator for a JOnAS service or a JOnAS resource. * @param name Name of the JOnAS service or JOnAS resource to which this object is associated * @param configFileName name of the config file */ public BaseConfigurationActuator(final String name, final String configFileName) { // Get a logger for server traces logger = Log.getLogger(Log.JONAS_MANAGEMENT_PREFIX); this.name = name; this.configFileName = configFileName; this.lastSequence = 0; if (logger.isLoggable(BasicLevel.DEBUG)) { logger.log(BasicLevel.DEBUG, "Creating IConfigurationActuator for " + name + " - configuration file is " + configFileName); } }
/** * Construct JavaVM MBean. * @param pObjectName The MBean's OBJECT_NAME * @param props the JOnAS server's configuration properties. */ public JavaVm(final String pObjectName, final ServerProperties props) { super(pObjectName); javaVersion = props.getValue(JAVA_VERSION); javaVendor = props.getValue(JAVA_VM_NAME) + "-" + props.getValue(JAVA_VM_VERSION) + " / " + props.getValue(JAVA_VENDOR); javaHome = props.getValue(JAVA_HOME); try { java.net.InetAddress oInet = java.net.InetAddress.getLocalHost(); node = oInet.getCanonicalHostName(); } catch (java.net.UnknownHostException e) { node = NODE_LOCAL; } // get a logger for server traces sLogger = Log.getLogger(Log.JONAS_SERVER_PREFIX); }
logger = Log.getLogger(Log.JONAS_SECURITY_PREFIX);
private static Logger logger = Log.getLogger("org.ow2.jonas.deployment.ejb");