本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}