List of usage examples for org.apache.commons.logging.impl Log4JLogger Log4JLogger
public Log4JLogger(Logger logger)
From source file:org.apache.hadoop.fs.azure.TestNativeAzureFileSystemClientLogging.java
@Test public void testLoggingDisabled() throws Exception { LogCapturer logs = LogCapturer.captureLogs(new Log4JLogger(Logger.getRootLogger())); // Update configuration based on the Test. updateFileSystemConfiguration(false); performWASBOperations();/*from ww w .j a v a 2 s .co m*/ assertFalse(verifyStorageClientLogs(logs.getOutput(), TEMP_DIR)); }
From source file:org.apache.hupa.server.guice.providers.LogProvider.java
public Log get() { return new Log4JLogger("HupaLogger"); }
From source file:org.coconut.core.LoggersTest.java
@Test public void testCommonsLoggingName() { Logger l = Loggers.Commons.from(new Jdk14Logger("foobar")); assertEquals("foobar", Loggers.getName(l)); l = Loggers.Commons.from(new Log4JLogger(LogManager.getLogger("foobar2"))); assertEquals("foobar2", Loggers.getName(l)); l = Loggers.Commons.from(new NoOpLog("dkdkd")); assertNull(Loggers.getName(l));//from w ww . j a v a 2s. c o m }
From source file:org.globus.gatekeeper.jobmanager.AbstractJobManager.java
protected String redirectThruFile(String file, int err) throws JobManagerException { OutputStream out = openUrl(file, err); File outFile;/*from w w w.j a v a 2s. co m*/ try { outFile = File.createTempFile("output", ".tmp"); } catch (IOException e) { throw new JobManagerException(err, e); } fileList.add(outFile); if (_outputFollower == null) { _outputFollower = new Tail(); _outputFollower.setLogger(new Log4JLogger(_jobLogger)); _outputFollower.start(); } try { _outputFollower.addFile(outFile, out, 0); } catch (IOException e) { _jobLogger.error("Unexpected error in io redirection", e); } return outFile.getAbsolutePath(); }
From source file:org.springframework.boot.logging.log4j.Log4JLoggingSystemTests.java
@Before public void setup() { this.logger = new Log4JLogger(getClass().getName()); }