List of usage examples for java.util.logging Logger getLogger
@CallerSensitive public static Logger getLogger(String name)
From source file:com.u2apple.tool.service.IdentifyAnalyticsService.java
private static Map loadModels() { Map<String, String> map = new HashMap<>(); Properties props = new Properties(); try {// ww w . j a v a 2s .c om props.load(IdentifyAnalyticsService.class.getResourceAsStream(Constants.MODELS)); props.forEach((Object key, Object value) -> { String productId = (String) key; String model = AndroidDeviceUtils.formatModel((String) value); if (model.contains(",")) { String[] models = model.split(","); for (String m : models) { map.put(m.trim(), productId); } } else { map.put(model, productId); } }); } catch (IOException ex) { Logger.getLogger(IdentifyAnalyticsService.class.getName()).log(Level.SEVERE, null, ex); } return map; }
From source file:gradingfun.GradeParser.java
public GradeParser(File file) { try {//from w w w .j a v a 2 s.com this.parser = CSVParser.parse(file, Charset.defaultCharset(), CSVFormat.RFC4180); } catch (IOException ex) { Logger.getLogger(GradeParser.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.aes.touresbalon.touresbalonoms.utilities.OmsUtil.java
public static void copiarPropiedades(Object origen, Object destino) { try {//from ww w. j av a 2 s. c o m org.apache.commons.beanutils.BeanUtils.copyProperties(origen, destino); } catch (IllegalAccessException | InvocationTargetException ex) { Logger.getLogger(OmsUtil.class.getName()).log(Level.SEVERE, "Error al usar utilitario copiar propiedades", ex); } }
From source file:lucel_updater.models.FTPClientManager.java
public FTPClientManager() { Logger logger = Logger.getLogger("MyLog"); FileHandler fh;/* w w w .j a v a2s.com*/ try { // This block configure the logger with handler and formatter /*fh = new FileHandler("C:/lucel.log"); logger.addHandler(fh); SimpleFormatter formatter = new SimpleFormatter(); fh.setFormatter(formatter);*/ URL loc = FTPClient.class.getProtectionDomain().getCodeSource().getLocation(); logger.info("Class: " + FTPClient.class.getSimpleName() + " loaded from " + loc); //this.ftpClient = new FTPClient(); this.ftpClient = new Ftp(); ftpClient.getContext().setFileTransferMode('I'); logger.info("OK FTP !"); } catch (Exception e) { e.printStackTrace(); Logger.getLogger(this.getClass().getName()).warning("e=" + e.getMessage()); System.out.println(e.getMessage()); logger.info(e.getMessage()); } }
From source file:com.eu.evaluation.server.eva.Thread1.java
public void run() { try {/*ww w. ja v a 2s .c o m*/ double t = Math.random(); long sleep = (long) (t * 10000); Thread.sleep(sleep); logger.debug(" : " + threadName + " " + sleep); } catch (InterruptedException ex) { Logger.getLogger(Thread1.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.liscs.server.utils.JacksonUtils.java
public T stringToObject(String json, Class clazz) { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); try {/*w ww . j ava 2s . c om*/ T result = (T) objectMapper.readValue(json, clazz); return result; } catch (IOException ex) { Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex); } return null; }
From source file:com.kahlon.guard.controller.example.SimpleBean.java
public void displayInfo() { Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Display Info works"); }
From source file:com.mmone.gpdati.allotment.GpDatiDbDispoMap.java
public GpDatiDbDispoMap(Database database) { this.database = database; try {/*www . jav a 2 s . co m*/ loadAll(); } catch (SQLException ex) { Logger.getLogger(GpDatiDispoRecord.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.mmone.hsqldb.Database.java
public Database(String dbPath) { this.dbParh = dbPath; try {//from w w w.j a va 2 s . co m setup(); } catch (SQLException ex) { System.out.println("Error - " + ex.getMessage()); Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.app.inventario.logica.seguridad.IntentosLoginLogicaImpl.java
public void actualizarIntentosFallidos(String usuario) throws HibernateException { try {/*from w w w . jav a2 s. co m*/ intentosLoginDAO.actualizarIntentosFallidos(usuario); } catch (HibernateException he) { Logger.getLogger(IntentosLoginLogicaImpl.class.getName()).log(Level.SEVERE, null, he); throw he; } }