List of usage examples for org.apache.commons.logging.impl LogFactoryImpl LOG_PROPERTY
String LOG_PROPERTY
To view the source code for org.apache.commons.logging.impl LogFactoryImpl LOG_PROPERTY.
Click Source Link
From source file:net.jperf.commonslog.CommonsLogStopWatchTest.java
protected void setUp() throws Exception { super.setUp(); originalLogFactoryAttribute = (String) LogFactory.getFactory().getAttribute(LogFactoryImpl.LOG_PROPERTY); LogFactory.getFactory().setAttribute(LogFactoryImpl.LOG_PROPERTY, SimpleLog.class.getName()); }
From source file:net.jperf.commonslog.CommonsLogStopWatchTest.java
protected void tearDown() throws Exception { LogFactory.getFactory().setAttribute(LogFactoryImpl.LOG_PROPERTY, originalLogFactoryAttribute); super.tearDown(); }
From source file:org.apache.sling.maven.jspc.JspcMojo.java
public void execute() throws MojoExecutionException { try {//from w ww . ja v a2 s .c om uriSourceRoot = sourceDirectory.getCanonicalPath(); } catch (Exception e) { uriSourceRoot = sourceDirectory.getAbsolutePath(); } // ensure output directory File outputDirectoryFile = new File(outputDirectory); if (!outputDirectoryFile.isDirectory()) { if (outputDirectoryFile.exists()) { throw new MojoExecutionException(outputDirectory + " exists but is not a directory"); } if (!outputDirectoryFile.mkdirs()) { throw new MojoExecutionException("Cannot create output directory " + outputDirectory); } } // have the files compiled String oldValue = System.getProperty(LogFactoryImpl.LOG_PROPERTY); try { // ensure the JSP Compiler does not try to use Log4J System.setProperty(LogFactoryImpl.LOG_PROPERTY, SimpleLog.class.getName()); executeInternal(); } catch (JasperException je) { getLog().error("Compilation Failure", je); throw new MojoExecutionException(je.getMessage(), je); } finally { if (oldValue == null) { System.clearProperty(LogFactoryImpl.LOG_PROPERTY); } else { System.setProperty(LogFactoryImpl.LOG_PROPERTY, oldValue); } } project.addCompileSourceRoot(outputDirectory); }
From source file:org.skife.jdbi.spring.TestSpringIntegration.java
public void setUp() throws Exception { System.setProperty(LogFactoryImpl.LOG_PROPERTY, NoOpLog.class.getName()); Tools.start();/*w w w. ja v a 2 s.co m*/ Tools.dropAndCreateSomething(); if (ctx == null) { ctx = new FileSystemXmlApplicationContext(CTX_BASE); } }