/** * Returns a instance of the IMetadataDomainRepository for the current session * * @return */ protected IMetadataDomainRepository getMetadataRepository() { IMetadataDomainRepository mdr = PentahoSystem.get( IMetadataDomainRepository.class, PentahoSessionHolder.getSession() ); if ( mdr instanceof ILogger ) { ( (ILogger) mdr ).setLoggingLevel( getLoggingLevel() ); } return mdr; }
/** * Returns a instance of the IMetadataDomainRepository for the current session * * @return */ protected IMetadataDomainRepository getMetadataRepository() { IMetadataDomainRepository mdr = PentahoSystem.get( IMetadataDomainRepository.class, PentahoSessionHolder.getSession() ); if ( mdr instanceof ILogger ) { ( (ILogger) mdr ).setLoggingLevel( getLoggingLevel() ); } return mdr; }
@Override public boolean start() throws PlatformInitializationException { PentahoSystem.setSystemSettingsService( new PathBasedSystemSettings() ); // initialize log4j to write to the console BasicConfigurator.configure(); boolean ret = super.start(); // set log levels // FIXME: find a better way to set log levels programmatically than this.. this can cause NPEs // and other errors, not to mention it's inefficient try { Object o = PentahoSystem.get( ISolutionEngine.class ); if ( o != null && o instanceof ILogger ) { ( (ILogger) o ).setLoggingLevel( ILogger.DEBUG ); } } catch ( Throwable e ) { logger.error( "Failed to set DEBUG log level due to ISolutionEngine not being available in MicroPlatform" ); } return ret; }