當前位置: 首頁>>代碼示例>>Java>>正文


Java Layout.getContentFormat方法代碼示例

本文整理匯總了Java中org.apache.logging.log4j.core.Layout.getContentFormat方法的典型用法代碼示例。如果您正苦於以下問題:Java Layout.getContentFormat方法的具體用法?Java Layout.getContentFormat怎麽用?Java Layout.getContentFormat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.logging.log4j.core.Layout的用法示例。


在下文中一共展示了Layout.getContentFormat方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: RollingRandomAccessFileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
private RollingRandomAccessFileAppender(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<String, String>(
                layout.getContentFormat());
        configuration.put("contentType", layout.getContentType());
        configuration.put("name", name);
        advertisement = advertiser.advertise(configuration);
    }
    this.fileName = fileName;
    this.filePattern = filePattern;
    this.advertiser = advertiser;
}
 
開發者ID:OuZhencong,項目名稱:log4j2,代碼行數:17,代碼來源:RollingRandomAccessFileAppender.java

示例2: AbstractFileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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;
}
 
開發者ID:apache,項目名稱:logging-log4j2,代碼行數:18,代碼來源:AbstractFileAppender.java

示例3: RollingRandomAccessFileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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;
}
 
開發者ID:apache,項目名稱:logging-log4j2,代碼行數:18,代碼來源:RollingRandomAccessFileAppender.java

示例4: RandomAccessFileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
private RandomAccessFileAppender(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;
}
 
開發者ID:apache,項目名稱:logging-log4j2,代碼行數:17,代碼來源:RandomAccessFileAppender.java

示例5: FileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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;
}
 
開發者ID:apache,項目名稱:logging-log4j2,代碼行數:18,代碼來源:FileAppender.java

示例6: FileLogAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
private FileLogAppender(String name, Layout<? extends Serializable> layout, Filter filter, RollingFileManager manager, String fileName, String filePattern, boolean ignoreExceptions, boolean immediateFlush, int bufferSize, Advertiser advertiser) {
    super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
    if (advertiser != null) {
        HashMap<String, String> configuration = new HashMap<>(layout.getContentFormat());
        configuration.put("contentType", layout.getContentType());
        configuration.put("name", name);
        this.advertisement = advertiser.advertise(configuration);
    }

    this.fileName = fileName;
    this.filePattern = filePattern;
    this.advertiser = advertiser;
}
 
開發者ID:MagicDroidX,項目名稱:Brynhildr,代碼行數:14,代碼來源:FileLogAppender.java

示例7: RollingFileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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<String, String>(layout.getContentFormat());
        configuration.put("contentType", layout.getContentType());
        configuration.put("name", name);
        advertisement = advertiser.advertise(configuration);
    }
    this.fileName = fileName;
    this.filePattern = filePattern;
    this.advertiser = advertiser;
}
 
開發者ID:OuZhencong,項目名稱:log4j2,代碼行數:16,代碼來源:RollingFileAppender.java

示例8: RandomAccessFileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
private RandomAccessFileAppender(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<String, String>(
                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;
}
 
開發者ID:OuZhencong,項目名稱:log4j2,代碼行數:16,代碼來源:RandomAccessFileAppender.java

示例9: FileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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<String, String>(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;
}
 
開發者ID:OuZhencong,項目名稱:log4j2,代碼行數:15,代碼來源:FileAppender.java

示例10: SocketAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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<String, String>(layout.getContentFormat());
        configuration.putAll(manager.getContentFormat());
        configuration.put("contentType", layout.getContentType());
        configuration.put("name", name);
        advertisement = advertiser.advertise(configuration);
    }
    this.advertiser = advertiser;
}
 
開發者ID:OuZhencong,項目名稱:log4j2,代碼行數:14,代碼來源:SocketAppender.java

示例11: RollingFileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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;
}
 
開發者ID:apache,項目名稱:logging-log4j2,代碼行數:15,代碼來源:RollingFileAppender.java

示例12: MemoryMappedFileAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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;
}
 
開發者ID:apache,項目名稱:logging-log4j2,代碼行數:15,代碼來源:MemoryMappedFileAppender.java

示例13: SocketAppender

import org.apache.logging.log4j.core.Layout; //導入方法依賴的package包/類
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;
}
 
開發者ID:apache,項目名稱:logging-log4j2,代碼行數:16,代碼來源:SocketAppender.java


注:本文中的org.apache.logging.log4j.core.Layout.getContentFormat方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。