本文整理匯總了Java中org.zeroturnaround.exec.stream.slf4j.Slf4jInfoOutputStream類的典型用法代碼示例。如果您正苦於以下問題:Java Slf4jInfoOutputStream類的具體用法?Java Slf4jInfoOutputStream怎麽用?Java Slf4jInfoOutputStream使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Slf4jInfoOutputStream類屬於org.zeroturnaround.exec.stream.slf4j包,在下文中一共展示了Slf4jInfoOutputStream類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: outputLoggingLevelsDefaultsToInfo
import org.zeroturnaround.exec.stream.slf4j.Slf4jInfoOutputStream; //導入依賴的package包/類
@Test
public void outputLoggingLevelsDefaultsToInfo() throws Exception {
rabbitMqCommand = new RabbitMqCommand(configBuilder.build(), command);
rabbitMqCommand.call();
ArgumentCaptor<OutputStream> osCaptor = ArgumentCaptor.forClass(OutputStream.class);
verify(processExecutor).redirectOutput(osCaptor.capture());
OutputStream os = osCaptor.getValue();
assertThat(os, instanceOf(Slf4jInfoOutputStream.class));
}
示例2: testSlf4jLoggerName
import org.zeroturnaround.exec.stream.slf4j.Slf4jInfoOutputStream; //導入依賴的package包/類
private void testSlf4jLoggerName(String fullName, Slf4jStream stream) {
ProcessExecutor executor = new ProcessExecutor();
executor.redirectOutput(stream.asInfo());
PumpStreamHandler pumps = executor.pumps();
OutputStream out = pumps.getOut();
Assert.assertTrue("Slf4jInfoOutputStream expected", out instanceof Slf4jInfoOutputStream);
Assert.assertEquals(fullName, ((Slf4jInfoOutputStream) out).getLogger().getName());
}
示例3: info
import org.zeroturnaround.exec.stream.slf4j.Slf4jInfoOutputStream; //導入依賴的package包/類
/**
* Logs the process' output to a given {@link Logger} with <code>info</code> level.
*
* @param log the logger to process the output to
* @return This process executor.
* @deprecated use {@link #redirectOutput(OutputStream)} and {@link Slf4jStream}
*/
public ProcessExecutor info(Logger log) {
return redirectOutput(new Slf4jInfoOutputStream(log));
}
示例4: redirectOutputAsInfo
import org.zeroturnaround.exec.stream.slf4j.Slf4jInfoOutputStream; //導入依賴的package包/類
/**
* Logs the process' output to a given {@link Logger} with <code>info</code> level.
*
* @param log the logger to output the message to
* @return This process executor.
* @deprecated use {@link #redirectOutput(OutputStream)} and {@link Slf4jStream}
*/
public ProcessExecutor redirectOutputAsInfo(Logger log) {
return redirectOutput(new Slf4jInfoOutputStream(log));
}
示例5: redirectErrorAsInfo
import org.zeroturnaround.exec.stream.slf4j.Slf4jInfoOutputStream; //導入依賴的package包/類
/**
* Logs the process' error to a given {@link Logger} with <code>info</code> level.
*
* @param log the logger to process output to
* @return This process executor.
* @deprecated use {@link #redirectError(OutputStream)} and {@link Slf4jStream}
*/
public ProcessExecutor redirectErrorAsInfo(Logger log) {
return redirectError(new Slf4jInfoOutputStream(log));
}