ch.qos.logback.core.OutputStreamAppender.addWarn()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(9.1k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中ch.qos.logback.core.OutputStreamAppender.addWarn()方法的一些代码示例,展示了OutputStreamAppender.addWarn()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputStreamAppender.addWarn()方法的具体详情如下:
包路径:ch.qos.logback.core.OutputStreamAppender
类名称:OutputStreamAppender
方法名:addWarn

OutputStreamAppender.addWarn介绍

暂无

代码示例

代码示例来源:origin: camunda/camunda-bpm-platform

public void setLayout(Layout<E> layout) {
 addWarn("This appender no longer admits a layout as a sub-component, set an encoder instead.");
 addWarn("To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.");
 addWarn("See also "+CODES_URL+"#layoutInsteadOfEncoder for details");
 LayoutWrappingEncoder<E> lwe = new LayoutWrappingEncoder<E>();
 lwe.setLayout(layout);
 lwe.setContext(context);
 this.encoder = lwe;
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * <p>
 * Sets the @link OutputStream} where the log output will go. The specified
 * <code>OutputStream</code> must be opened by the user and be writable. The
 * <code>OutputStream</code> will be closed when the appender instance is
 * closed.
 * 
 * @param outputStream
 *          An already opened OutputStream.
 */
public void setOutputStream(OutputStream outputStream) {
 lock.lock();
 try {
  // close any previously opened output stream
  closeOutputStream();
  this.outputStream = outputStream;
  if (encoder == null) {
   addWarn("Encoder has not been set. Cannot invoke its init method.");
   return;
  }
  encoderInit();
 } finally {
  lock.unlock();
 }
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public void setLayout(Layout<E> layout) {
  addWarn("This appender no longer admits a layout as a sub-component, set an encoder instead.");
  addWarn("To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.");
  addWarn("See also " + CODES_URL + "#layoutInsteadOfEncoder for details");
  LayoutWrappingEncoder<E> lwe = new LayoutWrappingEncoder<E>();
  lwe.setLayout(layout);
  lwe.setContext(context);
  this.encoder = lwe;
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

public void setLayout(Layout<E> layout) {
  addWarn("This appender no longer admits a layout as a sub-component, set an encoder instead.");
  addWarn("To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.");
  addWarn("See also " + CODES_URL + "#layoutInsteadOfEncoder for details");
  LayoutWrappingEncoder<E> lwe = new LayoutWrappingEncoder<E>();
  lwe.setLayout(layout);
  lwe.setContext(context);
  this.encoder = lwe;
}

代码示例来源:origin: tony19/logback-android

public void setLayout(Layout<E> layout) {
 addWarn("This appender no longer admits a layout as a sub-component, set an encoder instead.");
 addWarn("To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.");
 addWarn("See also "+CODES_URL+"#layoutInsteadOfEncoder for details");
 LayoutWrappingEncoder<E> lwe = new LayoutWrappingEncoder<E>();
 lwe.setLayout(layout);
 lwe.setContext(context);
 this.encoder = lwe;
}

代码示例来源:origin: ch.qos.logback/core

public void setLayout(Layout<E> layout) {
 addWarn("This appender no longer admits a layout as a sub-component, set an encoder instead.");
 addWarn("To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.");
 addWarn("See also "+CODES_URL+"#layoutInsteadOfEncoder for details");
 LayoutWrappingEncoder<E> lwe = new LayoutWrappingEncoder<E>();
 lwe.setLayout(layout);
 lwe.setContext(context);
 this.encoder = lwe;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

public void setLayout(Layout<E> layout) {
 addWarn("This appender no longer admits a layout as a sub-component, set an encoder instead.");
 addWarn("To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.");
 addWarn("See also "+CODES_URL+"#layoutInsteadOfEncoder for details");
 LayoutWrappingEncoder<E> lwe = new LayoutWrappingEncoder<E>();
 lwe.setLayout(layout);
 lwe.setContext(context);
 this.encoder = lwe;
}

代码示例来源:origin: com.hynnet/logback-core

public void setLayout(Layout<E> layout) {
 addWarn("This appender no longer admits a layout as a sub-component, set an encoder instead.");
 addWarn("To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.");
 addWarn("See also "+CODES_URL+"#layoutInsteadOfEncoder for details");
 LayoutWrappingEncoder<E> lwe = new LayoutWrappingEncoder<E>();
 lwe.setLayout(layout);
 lwe.setContext(context);
 this.encoder = lwe;
}

代码示例来源:origin: Nextdoor/bender

public void setLayout(Layout<E> layout) {
  addWarn("This appender no longer admits a layout as a sub-component, set an encoder instead.");
  addWarn("To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.");
  addWarn("See also " + CODES_URL + "#layoutInsteadOfEncoder for details");
  LayoutWrappingEncoder<E> lwe = new LayoutWrappingEncoder<E>();
  lwe.setLayout(layout);
  lwe.setContext(context);
  this.encoder = lwe;
}

代码示例来源:origin: tony19/logback-android

/**
 * <p>
 * Sets the @link OutputStream} where the log output will go. The specified
 * <code>OutputStream</code> must be opened by the user and be writable. The
 * <code>OutputStream</code> will be closed when the appender instance is
 * closed.
 *
 * @param outputStream
 *          An already opened OutputStream.
 */
public void setOutputStream(OutputStream outputStream) {
 lock.lock();
 try {
  // close any previously opened output stream
  closeOutputStream();
  this.outputStream = outputStream;
  if (encoder == null) {
   addWarn("Encoder has not been set. Cannot invoke its init method.");
   return;
  }
  encoderInit();
 } finally {
  lock.unlock();
 }
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * <p>
 * Sets the @link OutputStream} where the log output will go. The specified
 * <code>OutputStream</code> must be opened by the user and be writable. The
 * <code>OutputStream</code> will be closed when the appender instance is
 * closed.
 * 
 * @param outputStream
 *          An already opened OutputStream.
 */
public void setOutputStream(OutputStream outputStream) {
  lock.lock();
  try {
    // close any previously opened output stream
    closeOutputStream();
    this.outputStream = outputStream;
    if (encoder == null) {
      addWarn("Encoder has not been set. Cannot invoke its init method.");
      return;
    }
    encoderInit();
  } finally {
    lock.unlock();
  }
}

代码示例来源:origin: com.hynnet/logback-core

/**
 * <p>
 * Sets the @link OutputStream} where the log output will go. The specified
 * <code>OutputStream</code> must be opened by the user and be writable. The
 * <code>OutputStream</code> will be closed when the appender instance is
 * closed.
 * 
 * @param outputStream
 *          An already opened OutputStream.
 */
public void setOutputStream(OutputStream outputStream) {
 lock.lock();
 try {
  // close any previously opened output stream
  closeOutputStream();
  this.outputStream = outputStream;
  if (encoder == null) {
   addWarn("Encoder has not been set. Cannot invoke its init method.");
   return;
  }
  encoderInit();
 } finally {
  lock.unlock();
 }
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

/**
 * <p>
 * Sets the @link OutputStream} where the log output will go. The specified
 * <code>OutputStream</code> must be opened by the user and be writable. The
 * <code>OutputStream</code> will be closed when the appender instance is
 * closed.
 * 
 * @param outputStream
 *          An already opened OutputStream.
 */
public void setOutputStream(OutputStream outputStream) {
  lock.lock();
  try {
    // close any previously opened output stream
    closeOutputStream();
    this.outputStream = outputStream;
    if (encoder == null) {
      addWarn("Encoder has not been set. Cannot invoke its init method.");
      return;
    }
    encoderInit();
  } finally {
    lock.unlock();
  }
}

代码示例来源:origin: Nextdoor/bender

/**
 * <p>
 * Sets the @link OutputStream} where the log output will go. The specified
 * <code>OutputStream</code> must be opened by the user and be writable. The
 * <code>OutputStream</code> will be closed when the appender instance is
 * closed.
 * 
 * @param outputStream
 *          An already opened OutputStream.
 */
public void setOutputStream(OutputStream outputStream) {
  lock.lock();
  try {
    // close any previously opened output stream
    closeOutputStream();
    this.outputStream = outputStream;
    if (encoder == null) {
      addWarn("Encoder has not been set. Cannot invoke its init method.");
      return;
    }
    encoderInit();
  } finally {
    lock.unlock();
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

/**
 * <p>
 * Sets the @link OutputStream} where the log output will go. The specified
 * <code>OutputStream</code> must be opened by the user and be writable. The
 * <code>OutputStream</code> will be closed when the appender instance is
 * closed.
 * 
 * @param outputStream
 *          An already opened OutputStream.
 */
public void setOutputStream(OutputStream outputStream) {
 synchronized (lock) {
  // close any previously opened output stream
  closeOutputStream();
  this.outputStream = outputStream;
  if (encoder == null) {
   addWarn("Encoder has not been set. Cannot invoke its init method.");
   return;
  }
  encoderInit();
 }
}

代码示例来源:origin: ch.qos.logback/core

/**
 * <p>
 * Sets the @link OutputStream} where the log output will go. The specified
 * <code>OutputStream</code> must be opened by the user and be writable. The
 * <code>OutputStream</code> will be closed when the appender instance is
 * closed.
 * 
 * @param outputStream
 *          An already opened OutputStream.
 */
public void setOutputStream(OutputStream outputStream) {
 synchronized (lock) {
  // close any previously opened output stream
  closeOutputStream();
  this.outputStream = outputStream;
  if (encoder == null) {
   addWarn("Encoder has not been set. Cannot invoke its init method.");
   return;
  }
  encoderInit();
 }
}

相关文章