本文整理了Java中org.apache.logging.log4j.core.Layout.getContentFormat()
方法的一些代码示例,展示了Layout.getContentFormat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Layout.getContentFormat()
方法的具体详情如下:
包路径:org.apache.logging.log4j.core.Layout
类名称:Layout
方法名:getContentFormat
[英]Returns a description of the content format.
[中]返回内容格式的说明。
代码示例来源:origin: apache/hive
private HushableRandomAccessFileAppender(final String name, final Layout<? extends Serializable> layout,
final Filter filter, final RandomAccessFileManager manager, final String filename,
final boolean ignoreExceptions, final boolean immediateFlush, final Advertiser advertiser) {
super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
if (advertiser != null) {
final Map<String, String> configuration = new HashMap<>(
layout.getContentFormat());
configuration.putAll(manager.getContentFormat());
configuration.put("contentType", layout.getContentType());
configuration.put("name", name);
advertisement = advertiser.advertise(configuration);
}
this.fileName = filename;
this.advertiser = advertiser;
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
private RollingRandomAccessFileAppender(final String name, final Layout<? extends Serializable> layout,
final Filter filter, final RollingRandomAccessFileManager manager, final String fileName,
final String filePattern, final boolean ignoreExceptions,
final boolean immediateFlush, final int bufferSize, final Advertiser advertiser) {
super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
if (advertiser != null) {
final Map<String, String> configuration = new HashMap<>(layout.getContentFormat());
configuration.put("contentType", layout.getContentType());
configuration.put("name", name);
advertisement = advertiser.advertise(configuration);
} else {
advertisement = null;
}
this.fileName = fileName;
this.filePattern = filePattern;
this.advertiser = advertiser;
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
private RollingFileAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
final RollingFileManager manager, final String fileName, final String filePattern,
final boolean ignoreExceptions, final boolean immediateFlush, final Advertiser advertiser) {
super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
if (advertiser != null) {
final Map<String, String> configuration = new HashMap<>(layout.getContentFormat());
configuration.put("contentType", layout.getContentType());
configuration.put("name", name);
advertisement = advertiser.advertise(configuration);
}
this.fileName = fileName;
this.filePattern = filePattern;
this.advertiser = advertiser;
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
protected SocketAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
final AbstractSocketManager manager, final boolean ignoreExceptions, final boolean immediateFlush,
final Advertiser advertiser) {
super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
if (advertiser != null) {
final Map<String, String> configuration = new HashMap<>(layout.getContentFormat());
configuration.putAll(manager.getContentFormat());
configuration.put("contentType", layout.getContentType());
configuration.put("name", name);
this.advertisement = advertiser.advertise(configuration);
} else {
this.advertisement = null;
}
this.advertiser = advertiser;
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
private MemoryMappedFileAppender(final String name, final Layout<? extends Serializable> layout,
final Filter filter, final MemoryMappedFileManager manager, final String filename,
final boolean ignoreExceptions, final boolean immediateFlush, final Advertiser advertiser) {
super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
if (advertiser != null) {
final Map<String, String> configuration = new HashMap<>(layout.getContentFormat());
configuration.putAll(manager.getContentFormat());
configuration.put("contentType", layout.getContentType());
configuration.put("name", name);
advertisement = advertiser.advertise(configuration);
}
this.fileName = filename;
this.advertiser = advertiser;
}
代码示例来源:origin: org.infinispan/infinispan-commons-test
private CompressedFileAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
final FileManager manager,
final String filename, final boolean ignoreExceptions, final boolean immediateFlush,
final Advertiser advertiser) {
super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
if (advertiser != null) {
final Map<String, String> configuration = new HashMap<>(layout.getContentFormat());
configuration.putAll(manager.getContentFormat());
configuration.put("contentType", layout.getContentType());
configuration.put("name", name);
advertisement = advertiser.advertise(configuration);
}
this.fileName = filename;
this.advertiser = advertiser;
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
private FileAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
final FileManager manager, final String filename, final boolean ignoreExceptions,
final boolean immediateFlush, final Advertiser advertiser) {
super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
if (advertiser != null) {
final Map<String, String> configuration = new HashMap<>(layout.getContentFormat());
configuration.putAll(manager.getContentFormat());
configuration.put("contentType", layout.getContentType());
configuration.put("name", name);
advertisement = advertiser.advertise(configuration);
} else {
advertisement = null;
}
this.fileName = filename;
this.advertiser = advertiser;
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
private AbstractFileAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
final M manager, final String filename, final boolean ignoreExceptions,
final boolean immediateFlush, final Advertiser advertiser) {
super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
if (advertiser != null) {
final Map<String, String> configuration = new HashMap<>(layout.getContentFormat());
configuration.putAll(manager.getContentFormat());
configuration.put("contentType", layout.getContentType());
configuration.put("name", name);
advertisement = advertiser.advertise(configuration);
} else {
advertisement = null;
}
this.fileName = filename;
this.advertiser = advertiser;
}
代码示例来源:origin: org.apereo.cas/cas-server-core-logging
builder.append("name", appender.getName());
builder.append("state", appender.getState());
builder.append("layoutFormat", appender.getLayout().getContentFormat());
builder.append("layoutContentType", appender.getLayout().getContentType());
if (appender instanceof FileAppender) {
内容来源于网络,如有侵权,请联系作者删除!