ch.qos.logback.core.encoder.LayoutWrappingEncoder.appendIfNotNull()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(109)

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

LayoutWrappingEncoder.appendIfNotNull介绍

暂无

代码示例

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

void writeFooter() throws IOException {
 if (layout != null && outputStream != null) {
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getPresentationFooter());
  appendIfNotNull(sb, layout.getFileFooter());
  if (sb.length() > 0) {
   outputStream.write(convertToBytes(sb.toString()));
   outputStream.flush();
  }
 }
}

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

void writeHeader() throws IOException {
 if (layout != null && (outputStream != null)) {
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getFileHeader());
  appendIfNotNull(sb, layout.getPresentationHeader());
  if (sb.length() > 0) {
   sb.append(CoreConstants.LINE_SEPARATOR);
   // If at least one of file header or presentation header were not
   // null, then append a line separator.
   // This should be useful in most cases and should not hurt.
   outputStream.write(convertToBytes(sb.toString()));
   outputStream.flush();
  }
 }
}

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

@Override
public byte[] footerBytes() {
 if (layout == null) {
  return null;
 }
 StringBuilder sb = new StringBuilder();
 appendIfNotNull(sb, layout.getPresentationFooter());
 appendIfNotNull(sb, layout.getFileFooter());
 return convertToBytes(sb.toString());
}

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

void writeFooter() throws IOException {
 if (layout != null && outputStream != null) {
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getPresentationFooter());
  appendIfNotNull(sb, layout.getFileFooter());
  if (sb.length() > 0) {
   outputStream.write(convertToBytes(sb.toString()));
   outputStream.flush();
  }
 }
}

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

void writeFooter() throws IOException {
 if (layout != null && outputStream != null) {
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getPresentationFooter());
  appendIfNotNull(sb, layout.getFileFooter());
  if (sb.length() > 0) {
   outputStream.write(convertToBytes(sb.toString()));
   outputStream.flush();
  }
 }
}

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

void writeFooter() throws IOException {
 if (layout != null && outputStream != null) {
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getPresentationFooter());
  appendIfNotNull(sb, layout.getFileFooter());
  if (sb.length() > 0) {
   outputStream.write(convertToBytes(sb.toString()));
   outputStream.flush();
  }
 }
}

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

@Override
public byte[] footerBytes() {
  if (layout == null)
    return null;
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getPresentationFooter());
  appendIfNotNull(sb, layout.getFileFooter());
  return convertToBytes(sb.toString());
}

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

@Override
public byte[] footerBytes() {
  if (layout == null)
    return null;
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getPresentationFooter());
  appendIfNotNull(sb, layout.getFileFooter());
  return convertToBytes(sb.toString());
}

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

@Override
public byte[] footerBytes() {
  if (layout == null)
    return null;
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getPresentationFooter());
  appendIfNotNull(sb, layout.getFileFooter());
  return convertToBytes(sb.toString());
}

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

@Override
public byte[] headerBytes() {
  if (layout == null)
    return null;
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getFileHeader());
  appendIfNotNull(sb, layout.getPresentationHeader());
  if (sb.length() > 0) {
    // If at least one of file header or presentation header were not
    // null, then append a line separator.
    // This should be useful in most cases and should not hurt.
    sb.append(CoreConstants.LINE_SEPARATOR);
  }
  return convertToBytes(sb.toString());
}

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

void writeHeader() throws IOException {
 if (layout != null && (outputStream != null)) {
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getFileHeader());
  appendIfNotNull(sb, layout.getPresentationHeader());
  if (sb.length() > 0) {
   sb.append(CoreConstants.LINE_SEPARATOR);
   // If at least one of file header or presentation header were not
   // null, then append a line separator.
   // This should be useful in most cases and should not hurt.
   outputStream.write(convertToBytes(sb.toString()));
   outputStream.flush();
  }
 }
}

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

void writeHeader() throws IOException {
 if (layout != null && (outputStream != null)) {
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getFileHeader());
  appendIfNotNull(sb, layout.getPresentationHeader());
  if (sb.length() > 0) {
   sb.append(CoreConstants.LINE_SEPARATOR);
   // If at least one of file header or presentation header were not
   // null, then append a line separator.
   // This should be useful in most cases and should not hurt.
   outputStream.write(convertToBytes(sb.toString()));
   outputStream.flush();
  }
 }
}

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

void writeHeader() throws IOException {
 if (layout != null && (outputStream != null)) {
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getFileHeader());
  appendIfNotNull(sb, layout.getPresentationHeader());
  if (sb.length() > 0) {
   sb.append(CoreConstants.LINE_SEPARATOR);
   // If at least one of file header or presentation header were not
   // null, then append a line separator.
   // This should be useful in most cases and should not hurt.
   outputStream.write(convertToBytes(sb.toString()));
   outputStream.flush();
  }
 }
}

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

@Override
public byte[] headerBytes() {
  if (layout == null)
    return null;
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getFileHeader());
  appendIfNotNull(sb, layout.getPresentationHeader());
  if (sb.length() > 0) {
    // If at least one of file header or presentation header were not
    // null, then append a line separator.
    // This should be useful in most cases and should not hurt.
    sb.append(CoreConstants.LINE_SEPARATOR);
  }
  return convertToBytes(sb.toString());
}

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

@Override
public byte[] headerBytes() {
 if (layout == null) {
  return null;
 }
 StringBuilder sb = new StringBuilder();
 appendIfNotNull(sb, layout.getFileHeader());
 appendIfNotNull(sb, layout.getPresentationHeader());
 if (sb.length() > 0) {
  // If at least one of file header or presentation header were not
  // null, then append a line separator.
  // This should be useful in most cases and should not hurt.
  sb.append(CoreConstants.LINE_SEPARATOR);
 }
 return convertToBytes(sb.toString());
}

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

@Override
public byte[] headerBytes() {
  if (layout == null)
    return null;
  StringBuilder sb = new StringBuilder();
  appendIfNotNull(sb, layout.getFileHeader());
  appendIfNotNull(sb, layout.getPresentationHeader());
  if (sb.length() > 0) {
    // If at least one of file header or presentation header were not
    // null, then append a line separator.
    // This should be useful in most cases and should not hurt.
    sb.append(CoreConstants.LINE_SEPARATOR);
  }
  return convertToBytes(sb.toString());
}

相关文章