当前位置: 首页>>代码示例>>Java>>正文


Java LogManager.getFormatterLogger方法代码示例

本文整理汇总了Java中org.apache.logging.log4j.LogManager.getFormatterLogger方法的典型用法代码示例。如果您正苦于以下问题:Java LogManager.getFormatterLogger方法的具体用法?Java LogManager.getFormatterLogger怎么用?Java LogManager.getFormatterLogger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.logging.log4j.LogManager的用法示例。


在下文中一共展示了LogManager.getFormatterLogger方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AbstractDXRAMService

import org.apache.logging.log4j.LogManager; //导入方法依赖的package包/类
/**
 * Constructor
 *
 * @param p_shortName
 *         Short name of the service (used for terminal)
 */
protected AbstractDXRAMService(final String p_shortName, final Class<T> p_configClass) {
    LOGGER = LogManager.getFormatterLogger(getClass().getSimpleName());
    m_shortName = p_shortName;

    // create default configuration
    try {
        m_config = p_configClass.newInstance();
    } catch (final InstantiationException | IllegalAccessException e) {
        throw new DXRAMRuntimeException(e);
    }
}
 
开发者ID:hhu-bsinfo,项目名称:dxram,代码行数:18,代码来源:AbstractDXRAMService.java

示例2: AbstractDXRAMComponent

import org.apache.logging.log4j.LogManager; //导入方法依赖的package包/类
/**
 * Constructor
 *
 * @param p_priorityInit
 *         Default init priority for this component
 * @param p_priorityShutdown
 *         Default shutdown priority for this component
 */
protected AbstractDXRAMComponent(final short p_priorityInit, final short p_priorityShutdown, final Class<T> p_configClass) {
    LOGGER = LogManager.getFormatterLogger(getClass().getSimpleName());
    m_priorityInit = p_priorityInit;
    m_priorityShutdown = p_priorityShutdown;

    // create default configuration
    try {
        m_config = p_configClass.newInstance();
    } catch (final InstantiationException | IllegalAccessException e) {
        throw new DXRAMRuntimeException(e);
    }
}
 
开发者ID:hhu-bsinfo,项目名称:dxram,代码行数:21,代码来源:AbstractDXRAMComponent.java

示例3: test01

import org.apache.logging.log4j.LogManager; //导入方法依赖的package包/类
@Test
public void test01() {
    Logger logger = LogManager.getFormatterLogger(LogTest.class);

    String name = "李志伟";
    Date birthday = new Date();

    logger.debug("用户名称:[{}], 日期:[{}]", name, birthday);
    logger.debug("用户名称:[%s], 日期:[%s]", name, birthday);
    logger.debug("用户名称:[%1$s], 日期:[%2$tY-%2$tm-%2$te]", name, birthday);
    logger.debug("Integer.MAX_VALUE = [%,d]", Integer.MAX_VALUE);
    logger.debug("Long.MAX_VALUE = [%,d]", Long.MAX_VALUE);

    LogManager.shutdown();
}
 
开发者ID:Lzw2016,项目名称:log4j2-learn,代码行数:16,代码来源:LogTest.java

示例4: getLogger

import org.apache.logging.log4j.LogManager; //导入方法依赖的package包/类
public static Logger getLogger() {
	if(logger == null) {
		logger = LogManager.getFormatterLogger(Reference.MODID);
	}
	return logger;
}
 
开发者ID:ThePwnd,项目名称:RPGEssence,代码行数:7,代码来源:Utils.java

示例5: AbstractDXRAMComponentConfig

import org.apache.logging.log4j.LogManager; //导入方法依赖的package包/类
/**
 * Constructor
 *
 * @param p_class
 *         Class extending the abstract component class of this configuration
 * @param p_enabledForSuperpeer
 *         True to enable the component if the node is a superpeer, false to disable
 * @param p_enabledForPeer
 *         True to enable the component if the node is a peer, false to disable
 */
protected AbstractDXRAMComponentConfig(final Class<? extends AbstractDXRAMComponent> p_class, final boolean p_enabledForSuperpeer, final boolean p_enabledForPeer) {
    LOGGER = LogManager.getFormatterLogger(getClass().getSimpleName());
    m_class = getClass().getName();
    m_componentClass = p_class.getSimpleName();
    m_enabledForSuperpeer = p_enabledForSuperpeer;
    m_enabledForPeer = p_enabledForPeer;
}
 
开发者ID:hhu-bsinfo,项目名称:dxram,代码行数:18,代码来源:AbstractDXRAMComponentConfig.java

示例6: AbstractDXRAMServiceConfig

import org.apache.logging.log4j.LogManager; //导入方法依赖的package包/类
/**
 * Constructor
 *
 * @param p_class
 *         Class extending the abstract service class of this configuration
 * @param p_enabledForSuperpeer
 *         True to enable the service if the node is a superpeer, false to disable
 * @param p_enabledForPeer
 *         True to enable the service if the node is a peer, false to disable
 */
protected AbstractDXRAMServiceConfig(final Class<? extends AbstractDXRAMService> p_class, final boolean p_enabledForSuperpeer,
        final boolean p_enabledForPeer) {
    LOGGER = LogManager.getFormatterLogger(getClass().getSimpleName());
    m_class = getClass().getName();
    m_serviceClass = p_class.getSimpleName();
    m_enabledForSuperpeer = p_enabledForSuperpeer;
    m_enabledForPeer = p_enabledForPeer;
}
 
开发者ID:hhu-bsinfo,项目名称:dxram,代码行数:19,代码来源:AbstractDXRAMServiceConfig.java

示例7: TaskExecutor

import org.apache.logging.log4j.LogManager; //导入方法依赖的package包/类
/**
 * Creates a new TaskExecutor
 *
 * @param p_name
 *     Identifier for debug prints
 * @param p_threads
 *     Number of Threads to create
 */
TaskExecutor(final String p_name, final int p_threads) {
    LOGGER = LogManager.getFormatterLogger(TaskExecutor.class.getSimpleName() + ' ' + p_name);
    m_name = p_name;

    m_executor = Executors.newFixedThreadPool(p_threads, new ExecutorThreadFactory());
}
 
开发者ID:hhu-bsinfo,项目名称:dxram,代码行数:15,代码来源:TaskExecutor.java


注:本文中的org.apache.logging.log4j.LogManager.getFormatterLogger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。