本文整理了Java中ch.qos.logback.core.encoder.LayoutWrappingEncoder.appendIfNotNull()
方法的一些代码示例,展示了LayoutWrappingEncoder.appendIfNotNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LayoutWrappingEncoder.appendIfNotNull()
方法的具体详情如下:
包路径:ch.qos.logback.core.encoder.LayoutWrappingEncoder
类名称: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());
}
内容来源于网络,如有侵权,请联系作者删除!