當前位置: 首頁>>代碼示例>>Java>>正文


Java Slf4jInfoOutputStream類代碼示例

本文整理匯總了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));
}
 
開發者ID:AlejandroRivera,項目名稱:embedded-rabbitmq,代碼行數:12,代碼來源:RabbitMqCommandTest.java

示例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());
}
 
開發者ID:zeroturnaround,項目名稱:zt-exec,代碼行數:9,代碼來源:ProcessExecutorLoggerTest.java

示例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));
}
 
開發者ID:zacharee,項目名稱:RCTDRemoverforLG,代碼行數:11,代碼來源:ProcessExecutor.java

示例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));
}
 
開發者ID:zacharee,項目名稱:RCTDRemoverforLG,代碼行數:11,代碼來源:ProcessExecutor.java

示例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));
}
 
開發者ID:zacharee,項目名稱:RCTDRemoverforLG,代碼行數:11,代碼來源:ProcessExecutor.java


注:本文中的org.zeroturnaround.exec.stream.slf4j.Slf4jInfoOutputStream類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。