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


Java EngineConfig.setLogConfig方法代码示例

本文整理汇总了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);
}
 
开发者ID:n-at,项目名称:arbirter,代码行数:17,代码来源:BirtEngine.java

示例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;
    }
 
开发者ID:rafizanbaharum,项目名称:cfi-gov,代码行数:19,代码来源:BirtEngineFactory.java

示例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);	
}
 
开发者ID:mtpettyp,项目名称:openreports,代码行数:36,代码来源:BirtProvider.java

示例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);
}
 
开发者ID:eclipse,项目名称:birt,代码行数:8,代码来源:LoggerSettingTest.java

示例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;
		}
	}
 
开发者ID:knowbi,项目名称:knowbi-pentaho-pdi-birt-output,代码行数:36,代码来源:BIRTOutput.java

示例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;
}
 
开发者ID:terraframe,项目名称:geoprism,代码行数:16,代码来源:BirtEngine.java


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