List of usage examples for java.util.logging Logger getLogger
@CallerSensitive public static Logger getLogger(String name)
From source file:com.ut.healthelink.jobs.loadBatches.java
@Override public void execute(JobExecutionContext context) throws JobExecutionException { try {//from www.j av a 2s . co m SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this); transactionInManager.loadBatches(); } catch (Exception ex) { try { throw new Exception("Error occurred trying to load batch files from schedule task", ex); } catch (Exception ex1) { Logger.getLogger(loadBatches.class.getName()).log(Level.SEVERE, null, ex1); } } }
From source file:com.ut.healthelink.jobs.MoveSFTPFiles.java
@Override public void execute(JobExecutionContext context) throws JobExecutionException { try {/* w w w . ja v a 2s . c om*/ SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this); transactionInManager.moveSFTPFiles(); } catch (Exception ex) { try { throw new Exception("Error occurred trying to move SFTP files from schedule task", ex); } catch (Exception ex1) { Logger.getLogger(MoveSFTPFiles.class.getName()).log(Level.SEVERE, null, ex1); } } }
From source file:com.ut.healthelink.jobs.processBatches.java
@Override public void execute(JobExecutionContext context) throws JobExecutionException { try {//from www . j av a 2 s. c o m SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this); transactionInManager.processBatches(); } catch (Exception ex) { try { throw new Exception("Error occurred trying to process batch files from schedule task", ex); } catch (Exception ex1) { Logger.getLogger(processBatches.class.getName()).log(Level.SEVERE, null, ex1); } } }
From source file:com.raythos.sentilexo.persistence.cql.PersistedEntity.java
public static byte[] toBinaryJSon(PersistedEntity item) { try {/*from w w w . j a v a 2 s. c o m*/ SmileFactory f = new SmileFactory(); f.configure(SmileParser.Feature.REQUIRE_HEADER, true); ObjectMapper mapper = new ObjectMapper(f); mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY); byte[] result = mapper.writeValueAsBytes(item); return result; } catch (JsonProcessingException ex) { Logger.getLogger(QueryResultItemMapper.class.getName()).log(Level.SEVERE, null, ex); return null; } }
From source file:edu.xjtu.qxcamerabridge.LiveviewImageExtractor.java
public static void liveviewPipeLine(String liveviewURL, String folder) throws IOException { dumpFolder = folder;/*from w w w .j a v a 2 s.com*/ final InputStream liveviewStream = getLiveviewInputStream(liveviewURL); Thread liveviewFetcherThread = new Thread() { @Override public void run() { while (true) { extractLiveviewPayload(liveviewStream); if (liveviewPayload.fetchDone) { payloadQueue.add(liveviewPayload); // System.out.println("add queue"+payloadQueue.size()); } } } }; Thread liveviewDiskDumpThread = new Thread() { @Override public void run() { while (true) { try { Thread.sleep(50); } catch (InterruptedException ex) { Logger.getLogger(LiveviewImageExtractor.class.getName()).log(Level.SEVERE, null, ex); } // System.out.println("poll queue"+payloadQueue.size()); if (payloadQueue.size() > 0) { // System.out.println("not empty"); dumpToDisk(dumpFolder, payloadQueue.poll()); } } } }; liveviewFetcherThread.start(); liveviewDiskDumpThread.start(); }
From source file:br.com.itfox.utils.Utils.java
public static String dateFormat(String date_s) { String dateFormated = ""; try {// w ww . ja v a 2 s . com //String date_s = "2011-01-18 00:00:00.0"; // *** note that it's "yyyy-MM-dd hh:mm:ss" not "yyyy-mm-dd hh:mm:ss" SimpleDateFormat dt = new SimpleDateFormat("dd/MM/yy"); Date date = dt.parse(date_s); // *** same for the format String below SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); dateFormated = dt1.format(date); //System.out.println(dateFormated); } catch (ParseException ex) { Logger.getLogger(Utils.class.getName()).log(Level.SEVERE, null, ex); } return dateFormated; }
From source file:com.au.splashinc.JControl.Load.JsonLoader.java
@Override public void LoadConfig() { JSONParser parser = new JSONParser(); try {//from w w w. jav a2 s .c om Object obj = parser.parse(new FileReader(location)); JSONObject jsonObject = (JSONObject) obj; //Do stuff probably in another class } catch (IOException | ParseException ex) { Logger.getLogger(JsonLoader.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:Database.Handler.java
private Handler() { try {//from w w w .j a v a 2 s .c o m Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException ex) { Logger.getLogger(Handler.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:flink.FlowSchema.java
@Override public Flow deserialize(byte[] message) { Flow flow;/*from w w w. j a v a 2s. co m*/ try { flow = mapper.readValue(message, Flow.class); } catch (IOException ex) { Logger.getLogger(Job.class.getName()).log(Level.SEVERE, null, ex); return new Flow(); } return flow; }
From source file:iotest.WriteToFileTest.java
@Ignore @Test// w ww. j ava 2 s . co m public void writeToFile() { System.out.println("Writing to file"); try { File newFIle = new File("geekin.xml"); FileUtils.writeStringToFile(newFIle, "Dubem is a geek "); FileInputStream fi = new FileInputStream(newFIle); File fo = new File("geekout.xml"); FileUtils.copyInputStreamToFile(fi, fo); } catch (FileNotFoundException ex) { Logger.getLogger(WriteToFileTest.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException io) { io.printStackTrace(); } }