本文整理汇总了Java中org.eclipse.birt.report.engine.api.EngineConfig.setLogConfig方法的典型用法代码示例。如果您正苦于以下问题:Java EngineConfig.setLogConfig方法的具体用法?Java EngineConfig.setLogConfig怎么用?Java EngineConfig.setLogConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.birt.report.engine.api.EngineConfig
的用法示例。
在下文中一共展示了EngineConfig.setLogConfig方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
@PostConstruct
public void init() {
EngineConfig engineConfig = new EngineConfig();
engineConfig.setLogConfig("logs", Level.WARNING);
try {
Platform.startup(engineConfig);
} catch(Exception e) {
logger.error("Birt platform startup error", e);
System.exit(2);
}
IReportEngineFactory factory =
(IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
reportEngine = factory.createReportEngine(engineConfig);
}
示例2: getObject
import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
public IReportEngine getObject() {
EngineConfig config = new EngineConfig();
//This line injects the Spring Context into the BIRT Context
config.getAppContext().put("spring", this.context);
config.setLogConfig(null != this._resolvedDirectory ? this._resolvedDirectory.getAbsolutePath() : null, this.logLevel);
try {
Platform.startup(config);
} catch (BirtException e) {
throw new RuntimeException("Could not start the Birt engine!", e);
}
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
IReportEngine be = factory.createReportEngine(config);
this.birtEngine = be;
return be;
}
示例3: startBirtEngine
import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public static synchronized void startBirtEngine(IPlatformContext context)
{
log.info("Starting BIRT Engine and OSGI Platform using: " + context.getClass().getName());
HTMLServerImageHandler imageHandler = new HTMLServerImageHandler();
HTMLRenderOption emitterConfig = new HTMLRenderOption();
emitterConfig.setActionHandler(new HTMLActionHandler());
emitterConfig.setImageHandler(imageHandler);
EngineConfig config = new EngineConfig();
config.setEngineHome("");
config.setPlatformContext(context);
config.setLogConfig(null, Level.ALL);
config.getEmitterConfigs().put("html", emitterConfig);
try
{
Platform.startup(config);
}
catch (BirtException e)
{
log.error("BirtException", e);
}
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
birtEngine = factory.createReportEngine(config);
log.info("BIRT Engine Started");
birtEngine.changeLogLevel(Level.SEVERE);
}
示例4: createReportEngine
import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
private ReportEngine createReportEngine(Level logLevel, String fileName)
{
EngineConfig engineConfig = new EngineConfig();
engineConfig.setLogConfig(null, logLevel);
engineConfig.setLogFile(fileName);
return new ReportEngine(engineConfig);
}
示例5: init
import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
public boolean init(StepMetaInterface smi, StepDataInterface sdi){
// Boot the BIRT reporting engine.
try {
String birtHomeStr = System.getProperty("user.dir") + System.getProperty("file.separator") + "plugins/BIRTOutput/";
EngineConfig config = new EngineConfig();
birtStream = getClass().getClassLoader().getResourceAsStream("plugins/BIRTOutput/birt.properties");
birtProps.load(birtStream);
String logDir = birtProps.getProperty("logging.dir");
String logLevel = birtProps.getProperty("logging.level");
System.out.println("logging dir: " + logDir);
System.out.println("logging dir: " + logLevel);
// config.setLogConfig("/tmp", Level.ALL);
config.setLogConfig(logDir, Level.parse(logLevel));
Platform.startup(config);
config.setEngineHome("");
IPlatformContext context = new PlatformFileContext();
config.setPlatformContext( context );
IReportEngineFactory factory = (IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
engine = factory.createReportEngine(config);
return super.init(smi, sdi);
}catch(IOException ioe){
ioe.printStackTrace();
return false;
}catch (BirtException be) {
be.printStackTrace();
return false;
}
}
示例6: getBirtEngine
import org.eclipse.birt.report.engine.api.EngineConfig; //导入方法依赖的package包/类
public static synchronized IReportEngine getBirtEngine(String logDirectory) throws BirtException
{
if (engine == null)
{
EngineConfig config = new EngineConfig();
config.setLogConfig(logDirectory, LogLevel.SEVERE.getLevel());
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
engine = factory.createReportEngine(config);
}
return engine;
}