List of usage examples for java.util.logging Level INFO
Level INFO
To view the source code for java.util.logging Level INFO.
Click Source Link
From source file:pl.mariuszczarny.springbatchforslask.main.AppJobAllImport.java
/** * @param args the command line arguments *//*from w ww.j av a2 s . c o m*/ public static void main(String[] args) { fLogger.log(Level.INFO, "Import all csv to mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/job-all-import.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobLauncher = (JobLauncher) context.getBean("jobLauncher"); Job job = (Job) context.getBean("importJob"); try { JobExecution execution = jobLauncher.run(job, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromdb.ClubImport.java
/** * @param args the command line arguments *///from w w w . ja va 2s. c om public static void main(String[] args) { fLogger.log(Level.INFO, "Import club csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/club.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobCityLauncher = (JobLauncher) context.getBean("jobLauncher"); Job clubJob = (Job) context.getBean("clubImportJob"); try { JobExecution execution = jobCityLauncher.run(clubJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromdb.CoachImport.java
/** * @param args the command line arguments */// ww w . j a v a 2 s .com public static void main(String[] args) { fLogger.log(Level.INFO, "Import coach csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/coach.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobCoachLauncher = (JobLauncher) context.getBean("jobLauncher"); Job coachJob = (Job) context.getBean("coachImportJob"); try { JobExecution execution = jobCoachLauncher.run(coachJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromdb.StaffImport.java
/** * @param args the command line arguments *//*w w w . ja va2s . c o m*/ public static void main(String[] args) { fLogger.log(Level.INFO, "Import staff csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/staff.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobStaffLauncher = (JobLauncher) context.getBean("jobLauncher"); Job staffJob = (Job) context.getBean("staffImportJob"); try { JobExecution execution = jobStaffLauncher.run(staffJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromcsv.ArrangeExport.java
/** * @param args the command line arguments *//*from w w w . j a v a2s.c o m*/ public static void main(String[] args) { fLogger.log(Level.INFO, "Import city csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/city.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobCityLauncher = (JobLauncher) context.getBean("jobLauncher"); Job cityJob = (Job) context.getBean("cityImportJob"); try { JobExecution execution = jobCityLauncher.run(cityJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromdb.PersonImport.java
/** * @param args the command line arguments *///from www. j a va 2s.co m public static void main(String[] args) { fLogger.log(Level.INFO, "Import person csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/person.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobPersonLauncher = (JobLauncher) context.getBean("jobLauncher"); Job personJob = (Job) context.getBean("personImportJob"); try { JobExecution execution = jobPersonLauncher.run(personJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromdb.PlayerImport.java
/** * @param args the command line arguments *///from w ww .j a va2 s . c om public static void main(String[] args) { fLogger.log(Level.INFO, "Import player csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/player.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobPlayerLauncher = (JobLauncher) context.getBean("jobLauncher"); Job playerJob = (Job) context.getBean("playerImportJob"); try { JobExecution execution = jobPlayerLauncher.run(playerJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromdb.ArrangeImport.java
/** * @param args the command line arguments *//*from ww w . j a v a2s . c o m*/ public static void main(String[] args) { fLogger.log(Level.INFO, "Import arrange csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/arrange.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobArrangeLauncher = (JobLauncher) context.getBean("jobLauncher"); Job arrangeJob = (Job) context.getBean("arrangeImportJob"); try { JobExecution execution = jobArrangeLauncher.run(arrangeJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromdb.FinanceImport.java
/** * @param args the command line arguments *//* w w w . j a v a2 s . c o m*/ public static void main(String[] args) { fLogger.log(Level.INFO, "Import finance csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/finance.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobFinanceLauncher = (JobLauncher) context.getBean("jobLauncher"); Job financeJob = (Job) context.getBean("financeImportJob"); try { JobExecution execution = jobFinanceLauncher.run(financeJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }
From source file:pl.mariuszczarny.springbatchforslask.main.fromdb.FixtureImport.java
/** * @param args the command line arguments *//* w w w . java 2 s.c o m*/ public static void main(String[] args) { fLogger.log(Level.INFO, "Import fixture csv from mysql"); String[] springConfig = { "spring/batch/config/database.xml", "spring/batch/config/context.xml", "spring/batch/jobs/fromdb/fixture.xml" }; ApplicationContext context = new ClassPathXmlApplicationContext(springConfig); JobLauncher jobFixtureLauncher = (JobLauncher) context.getBean("jobLauncher"); Job fixtureJob = (Job) context.getBean("fixtureImportJob"); try { JobExecution execution = jobFixtureLauncher.run(fixtureJob, new JobParameters()); fLogger.log(Level.INFO, "Exit Status : {0}", execution.getStatus()); } catch (JobParametersInvalidException e) { e.getMessage(); } catch (JobExecutionAlreadyRunningException e) { e.getMessage(); } catch (JobInstanceAlreadyCompleteException e) { e.getMessage(); } catch (JobRestartException e) { e.getMessage(); } fLogger.log(Level.INFO, "Done"); }