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


Java MessageConveyor类代码示例

本文整理汇总了Java中ch.qos.cal10n.MessageConveyor的典型用法代码示例。如果您正苦于以下问题:Java MessageConveyor类的具体用法?Java MessageConveyor怎么用?Java MessageConveyor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: main

import ch.qos.cal10n.MessageConveyor; //导入依赖的package包/类
public static void main(String[] args) throws JoranException {

    LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
    context.reset();
    JoranConfigurator joranConfigurator = new JoranConfigurator();
    joranConfigurator.setContext(context);
    joranConfigurator.doConfigure("src/test/java/ch/qos/logback/classic/issue/DarioCampagna/logback-marker.xml");
    IMessageConveyor mc = new MessageConveyor(Locale.getDefault());
    LocLoggerFactory llFactory_default = new LocLoggerFactory(mc);
    LocLogger locLogger = llFactory_default.getLocLogger("defaultLocLogger");
    Marker alwaysMarker = MarkerFactory.getMarker("ALWAYS");
    locLogger.info(alwaysMarker, "This will always appear.");
    locLogger.info("Hello!");
  }
 
开发者ID:cscfa,项目名称:bartleby,代码行数:15,代码来源:Main.java

示例2: IDSGenLogToolpack

import ch.qos.cal10n.MessageConveyor; //导入依赖的package包/类
/** 建立一个工具包。 */
public IDSGenLogToolpack()
{
	訊息型態 = new MessageConveyor(Locale.TAIWAN);
	記錄工具包 = new LocLoggerFactory(訊息型態);
}
 
开发者ID:sih4sing5hong5,项目名称:han3_ji7_tsoo1_kian3,代码行数:7,代码来源:IDSGenLogToolpack.java

示例3: LanguageController

import ch.qos.cal10n.MessageConveyor; //导入依赖的package包/类
/**
 * Private constructor. The fallback language is set to English for all
 * messages in nightingale.
 */
private LanguageController() {
    conveyor = new MessageConveyor(new Locale("en"));
}
 
开发者ID:cereda,项目名称:nightingale,代码行数:8,代码来源:LanguageController.java

示例4: setLocale

import ch.qos.cal10n.MessageConveyor; //导入依赖的package包/类
/**
 * Sets the current locale. This method actually resets the language
 * conveyor in order to use the new locale.
 * @param locale The new locale for localized messages through the language
 * conveyor.
 */
public void setLocale(Locale locale) {
    conveyor = new MessageConveyor(locale);
}
 
开发者ID:cereda,项目名称:nightingale,代码行数:10,代码来源:LanguageController.java


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