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


Java SimpleLog4JLogSystem类代码示例

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


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

示例1: newVelocityEngine

import org.apache.velocity.runtime.log.SimpleLog4JLogSystem; //导入依赖的package包/类
private static VelocityEngine newVelocityEngine() {
    ExtendedProperties prop = new ExtendedProperties();
    prop.addProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, SimpleLog4JLogSystem.class.getName());
    prop.addProperty("runtime.log.logsystem.log4j.category", "GenerateToString");

    VelocityEngine velocity = new VelocityEngine();
    velocity.setExtendedProperties(prop);
    velocity.init();

    return velocity;
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:12,代码来源:VelocityHelper.java

示例2: newVeloictyEngine

import org.apache.velocity.runtime.log.SimpleLog4JLogSystem; //导入依赖的package包/类
/**
 * Returns a new instance of the VelocityEngine.
 * <p/>
 * The engine is initialized and outputs its logging to IDEA logging.
 *
 * @return a new velocity engine that is initialized.
 */
private static VelocityEngine newVeloictyEngine() {
  ExtendedProperties prop = new ExtendedProperties();
  prop.addProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, SimpleLog4JLogSystem.class.getName());
  prop.addProperty("runtime.log.logsystem.log4j.category", "GenerateToString");
  prop.addProperty(RuntimeConstants.RESOURCE_LOADER, "includes");
  prop.addProperty("includes.resource.loader.class", VelocityIncludesClassLoader.class.getName());
  VelocityEngine velocity = new VelocityEngine();
  velocity.setExtendedProperties(prop);
  velocity.init();
  return velocity;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:VelocityFactory.java

示例3: getEngine

import org.apache.velocity.runtime.log.SimpleLog4JLogSystem; //导入依赖的package包/类
private static synchronized VelocityEngine getEngine()
{
    if (instance == null)
    {
        try
        {
            VelocityEngine engine = new VelocityEngine();
            ExtendedProperties extendedProperties = new ExtendedProperties();

            extendedProperties.addProperty(RuntimeConstants.RESOURCE_LOADER, "file");
            extendedProperties.addProperty(RuntimeConstants.PARSER_POOL_SIZE, "1");

            extendedProperties.addProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.FileResourceLoader");
            extendedProperties.addProperty("file.resource.loader.path", PathManager.getPluginsPath() + "/Copyright/resources");

            extendedProperties.addProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
                SimpleLog4JLogSystem.class.getName());
            extendedProperties
                .addProperty("runtime.log.logsystem.log4j.category", CopyrightManager.class.getName());

            engine.setExtendedProperties(extendedProperties);
            engine.init();

            instance = engine;
        }
        catch (Exception ignored)
        {
        }
    }

    return instance;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:VelocityHelper.java

示例4: newVeloictyEngine

import org.apache.velocity.runtime.log.SimpleLog4JLogSystem; //导入依赖的package包/类
/**
 * Returns a new instance of the VelocityEngine.
 * <p/>
 * The engine is initialized and outputs its logging to IDEA logging.
 *
 * @return  a new velocity engine that is initialized.
 * @throws Exception  error creating the VelocityEngine.
 */
public static VelocityEngine newVeloictyEngine() throws Exception {
    ExtendedProperties prop = new ExtendedProperties();
    prop.addProperty(VelocityEngine.RUNTIME_LOG_LOGSYSTEM_CLASS, SimpleLog4JLogSystem.class.getName());
    prop.addProperty("runtime.log.logsystem.log4j.category", "GenerateToString");
    VelocityEngine velocity = new VelocityEngine();
    velocity.setExtendedProperties(prop);
    velocity.init();
    return velocity;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:VelocityFactory.java


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