/** * PUBLIC: * <p> * Set the log level * </p><p> * * @param level the new log level * </p> */ public void setLogLevel(int level) { getSessionLog().setLevel(level); }
/** * INTERNAL: * Get the singleton entityContainer. * @return EnityContainer */ public static synchronized JavaSECMPInitializer getJavaSECMPInitializer() { if (javaSECMPInitializer == null) { javaSECMPInitializer = new JavaSECMPInitializer(); } AbstractSessionLog.getLog().setLevel(JavaSECMPInitializer.getTopLinkLoggingLevel()); return javaSECMPInitializer; }
/** * INTERNAL: * Should be called only by the agent. (when weaving classes) * If succeeded return true, false otherwise. */ protected static void initializeFromAgent(Instrumentation instrumentation) throws Exception { AbstractSessionLog.getLog().setLevel(JavaSECMPInitializer.getTopLinkLoggingLevel()); // Squirrel away the instrumentation for later globalInstrumentation = instrumentation; // Create JavaSECMPInitializer singleton javaSECMPInitializer = new JavaSECMPInitializer(); // Initialize it javaSECMPInitializer.initialize(new HashMap(), javaSECMPInitializer); }
private void preProcess() throws URISyntaxException,MalformedURLException{ AbstractSessionLog.getLog().setLevel(this.logLevel); if(logWriter!=null){ ((DefaultSessionLog)AbstractSessionLog.getLog()).setWriter(logWriter);
protected void initOrUpdateLogging(Map m, SessionLog log) { String logLevelString = PropertiesHandler.getPropertyValueLogDebug(TopLinkProperties.LOGGING_LEVEL, m, session); if(logLevelString != null) { log.setLevel(AbstractSessionLog.translateStringToLoggingLevel(logLevelString)); String category = (String)entry.getKey(); String value = (String)entry.getValue(); log.setLevel(AbstractSessionLog.translateStringToLoggingLevel(value), category);
/** * JavaSECMPInitializerが生成されていない場合、configPathで指定されたdiconファイルを読み込んで生成処理を行います。 * * @param configPath * JavaSECMPInitializerを生成する定義を記述したdiconファイル名 * @param properties * JavaSECMPInitializer生成時に渡すPropertiesオブジェクト */ @SuppressWarnings("unchecked") public static void initializeFromContainer(final String configPath, final Map properties) { if (javaSECMPInitializer != null) { return; } final S2Container container = S2ContainerFactory.create(configPath); container.init(); try { javaSECMPInitializer = (JavaSECMPInitializer) container .getComponent(JavaSECMPInitializer.class); AbstractSessionLog.getLog().setLevel( JavaSECMPInitializer.getTopLinkLoggingLevel()); javaSECMPInitializer.initialize(properties, javaSECMPInitializer); } finally { container.destroy(); } }