@ -7,8 +7,6 @@ import com.fr.config.activator.BaseDBActivator;
import com.fr.config.activator.ConfigurationActivator ;
import com.fr.env.operator.CommonOperatorImpl ;
import com.fr.general.I18nResource ;
import com.fr.general.log.Log4jConfig ;
import com.fr.general.log.parser.ExtraPatternParserManager ;
import com.fr.health.activator.ModuleHealActivator ;
import com.fr.io.exporter.CSVExporter ;
import com.fr.io.exporter.EmbeddedTableDataExporter ;
@ -27,25 +25,18 @@ import com.fr.report.module.ReportBaseActivator;
import com.fr.report.write.WriteActivator ;
import com.fr.scheduler.SchedulerActivator ;
import com.fr.stable.WriteActor ;
import com.fr.stable.resource.ResourceLoader ;
import com.fr.store.StateServiceActivator ;
import com.fr.third.apache.log4j.Level ;
import com.fr.third.apache.log4j.PropertyConfigurator ;
import com.fr.workspace.simple.SimpleWork ;
import java.io.FileOutputStream ;
import java.io.IOException ;
import java.util.HashMap ;
import java.util.Map ;
import java.util.Properties ;
public class ExportApi {
public static void main ( String [ ] args ) {
initLog4j ( ) ;
/**定义报表运行环境,用于执行报表*/
com . fr . module . Module module = ActivatorToolBox . simpleLink ( new BaseDBActivator ( ) ,
new ConfigurationActivator ( ) ,
@ -138,24 +129,4 @@ public class ExportApi {
}
}
private static void initLog4j ( ) {
PropertyConfigurator . configure ( loadLog4jPropertiesFromJar ( Level . toLevel ( "INFO" ) ) ) ;
}
private static Properties loadLog4jPropertiesFromJar ( Level level ) {
Properties properties = new Properties ( ) ;
System . setProperty ( "LOG_HOME" , System . getProperty ( "user.dir" ) ) ;
System . setProperty ( "LOG_ROOT_LEVEL" , level . toString ( ) ) ;
ExtraPatternParserManager . setSystemProperty ( ) ;
try {
properties . load ( ResourceLoader . getResourceAsStream ( "/com/fr/general/log/log4j.properties" , Log4jConfig . class ) ) ;
} catch ( IOException ignore ) {
//do nothing
}
return properties ;
}
}