本文整理匯總了Java中org.apache.logging.log4j.core.Layout.getFooter方法的典型用法代碼示例。如果您正苦於以下問題:Java Layout.getFooter方法的具體用法?Java Layout.getFooter怎麽用?Java Layout.getFooter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.logging.log4j.core.Layout
的用法示例。
在下文中一共展示了Layout.getFooter方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: OutputStreamManager
import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
protected OutputStreamManager(final OutputStream os, final String streamName, final Layout<?> layout) {
super(streamName);
this.os = os;
if (layout != null) {
this.footer = layout.getFooter();
this.header = layout.getHeader();
if (this.header != null) {
try {
this.os.write(header, 0, header.length);
} catch (final IOException ioe) {
LOGGER.error("Unable to write header", ioe);
}
}
} else {
this.footer = null;
this.header = null;
}
}
示例2: stop
import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
@Override
public boolean stop(final long timeout, final TimeUnit timeUnit) {
setStopping();
super.stop(timeout, timeUnit, false);
final Layout<? extends Serializable> layout = getLayout();
if (layout != null) {
final byte[] bytes = layout.getFooter();
if (bytes != null) {
write(bytes);
}
}
setStopped();
return true;
}
示例3: stop
import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
@Override
public void stop() {
super.stop();
final Layout<? extends Serializable> layout = getLayout();
if (layout != null) {
final byte[] bytes = layout.getFooter();
if (bytes != null) {
write(bytes);
}
}
}
示例4: writeFooter
import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
protected void writeFooter(final Layout<?> layout, final OutputStream out) throws IOException {
final byte[] footer = layout.getFooter();
if (footer != null) {
out.write(footer);
}
}