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:de.crowdcode.kissmda.core.uml.PackageHelper.java
/** * Get root package.//from w w w . j a va 2 s .co m * * @param context * context of the transformer * @return UML2 package * @throws URISyntaxException */ public org.eclipse.uml2.uml.Package getRootPackage(Context context) throws URISyntaxException { logger.log(Level.INFO, "Get from following sourceModel: " + context.getSourceModel()); String uriString = FILE_PROTOCOL + context.getSourceModel(); logger.log(Level.INFO, "Get from following URI: " + uriString); URI uri = URI.createURI(uriString); readerWriter.registerSchema(); readerWriter.registerResourceFactories(); readerWriter.registerPathmaps(); org.eclipse.uml2.uml.Package outPackage = readerWriter.load(uri); return outPackage; }
From source file:jcr.FTPParser.java
private void parse(String workingDirectory) throws RepositoryException, IOException, Exception { Node node = JcrUtils.getOrCreateByPath(jcrServerNodePath + workingDirectory, null, session); String encoded = new String(workingDirectory.getBytes("UTF-8"), "ISO-8859-1"); FTPFile[] files = client.listFiles(encoded); logger.log(Level.INFO, "Parse {0} item in directory: {1}", new Object[] { files.length, workingDirectory }); for (FTPFile file : files) { if (file.isDirectory()) { parse(workingDirectory + "/" + file.getName()); } else {/*from ww w . jav a 2 s .c o m*/ String remote = workingDirectory + "/" + file.getName(); if (remote.endsWith(".md5") || remote.endsWith(".md5sum")) { parseChecksumFile(remote); } else if (remote.endsWith(".tgz.desc") || remote.endsWith(".zip.desc")) { parseDescriptorFile(remote); } else { parseFile(remote, file.getSize()); } } } }
From source file:com.neophob.sematrix.listener.OscServer.java
/** * //from ww w. j av a2 s . c o m * @param listeningPort */ public OscServer(PApplet papplet, int listeningPort) { if (listeningPort < 1) { LOG.log(Level.INFO, "Configured Port {0}, OSC Server disabled", new Object[] { listeningPort }); return; } this.listeningPort = listeningPort; LOG.log(Level.INFO, "Start OSC Server at port {0}", new Object[] { this.listeningPort }); OscProperties prop = new OscProperties(); //32kb buffer, maximal packet size prop.setDatagramSize(1024 * 32); prop.setNetworkProtocol(OscProperties.UDP); prop.setListeningPort(this.listeningPort); this.oscP5 = new OscP5(papplet, prop); this.oscP5.addListener(this); //log only error and warnings OscP5.setLogStatus(netP5.Logger.ALL, netP5.Logger.OFF); OscP5.setLogStatus(netP5.Logger.ERROR, netP5.Logger.ON); OscP5.setLogStatus(netP5.Logger.WARNING, netP5.Logger.ON); }
From source file:com.telefonica.euro_iaas.sdc.util.CommandExecutorShellImpl.java
/** * <p>// w ww . j a v a 2 s. co m * executeCommand * </p> * * @param command * a {@link java.lang.String} object. * @return an array of {@link java.lang.String} objects. * @throws java.io.IOException * if any. */ public String[] executeCommand(String command) throws ShellCommandException { String[] outputCommand = new String[2]; try { // Command is executed logger.log(Level.INFO, "Executing command: " + command); Process p = Runtime.getRuntime().exec(command); // Leemos la salida del comando outputCommand[0] = IOUtils.toString(p.getInputStream()); outputCommand[1] = IOUtils.toString(p.getErrorStream()); Integer exitValue = null; // this bucle is because sometimes the flows continues and the // comand // does not finish yet. while (exitValue == null) { try { exitValue = p.exitValue(); } catch (IllegalThreadStateException e) { logger.log(Level.FINEST, "The command does not finished yet"); } } if (!exitValue.equals(0)) { logger.log(Level.SEVERE, "Error executing command: " + outputCommand[1]); throw new ShellCommandException(outputCommand[1]); } return outputCommand; } catch (IOException e) { throw new ShellCommandException("Unexpected exception", e); } }
From source file:com.mobius.software.mqtt.performance.controller.ControllerRunner.java
private static void configureConsoleLogger() { Logger l = Logger.getLogger("org.glassfish.grizzly.http.server.HttpHandler"); l.setLevel(Level.INFO); l.setUseParentHandlers(false);// www. j a va 2s . c o m ConsoleHandler ch = new ConsoleHandler(); ch.setLevel(Level.INFO); l.addHandler(ch); }
From source file:com.titankingdoms.dev.titanchat.command.CommandManager.java
public CommandManager() { this.plugin = TitanChat.getInstance(); if (getCommandDirectory().mkdirs()) plugin.log(Level.INFO, "Creating commands directory..."); this.commands = new TreeMap<String, Command>(); this.labels = new HashMap<String, Command>(); }
From source file:net.hgw4.hal.SerialProtocol.java
/** * parse a message/*from ww w . j av a 2 s . c o m*/ * @param val raw byte msg * @return json obj created message */ public JSONObject parseMessage(byte[] val) { if (serialProtocolLogger.isLoggable(Level.INFO)) { serialProtocolLogger.info("parseMessage "); } try { int lenval = val.length; switch (protocolNumber) { case 0: //serial protocol ->0<- for fake sensor protocol //0...3bytes = nodeId //0...25bytes = timestamp //0...13bytes = value * N valori separati da virgola try { value = new String(val, 34, 2, "US-ASCII"); } catch (UnsupportedEncodingException ex) { Logger.getLogger(SerialProtocol.class.getName()).log(Level.SEVERE, null, ex); } break; case 1://serial protocol ->1<- for real temp sensor //#40000,0,1,464@ serie try { //TODO: cambiare il firmware del sens di temperatura String curdata = new String(val, 0, (val.length), "UTF-8"); int startPos = curdata.indexOf('#'); if (startPos >= 0) { value = new String(curdata.substring(startPos + 11, startPos + 14)); } else { value = "noData"; } } catch (UnsupportedEncodingException ex) { Logger.getLogger(SerialProtocol.class.getName()).log(Level.SEVERE, null, ex); } break; } //response message String msgRaw = new String("{" + "'value':'" + value + "'}"); msg = new JSONObject(msgRaw); } catch (JSONException ex) { Logger.getLogger(SerialProtocol.class.getName()).log(Level.SEVERE, null, ex); } return msg; }
From source file:pl.lodz.p.edu.ftims.poi.poi.controller.SyncronisationController.java
@RequestMapping(method = RequestMethod.POST) public @ResponseBody @SuppressWarnings("empty-statement") String checkpoint(@RequestBody String input) { logger.log(Level.INFO, "Sync:{0}", input); Gson gson = new Gson(); HistoryListDao h = gson.fromJson(input, HistoryListDao.class); logger.log(Level.INFO, "Sync:{0} h:", h); int i = 0;//from w w w . j a v a 2 s . c o m ErrorDao errorDao = new ErrorDao(Boolean.FALSE); String id = new String();//Do ukoszernienia try { for (HistoryDao history : h.getHistory()) { Department dep = dr.findOne(h.getDepartement()); Package pack = pr.findOne(history.getPack()); History historia = new History(); historia.setID(id);//Do ukoszernienia historia.setPack(pack); historia.setOddzial(dep); historia.setDate(history.getDate()); History save = hr.save(historia); id = save.getID(); // if (i >= 1) { // throw new Exception("Test"); // }; //Test mechanizmu ponawiania pack.getHistory().add(save); pr.save(pack); i++; } } catch (Exception e) { logger.log(Level.SEVERE, "Wyst\u0105pi\u0142 wyj\u0105tek w trakcie przetwarzania: {0}", e); try { History findOne = hr.findOne(id); logger.info(findOne.toString()); hr.delete(id); Package pack = findOne.getPack(); logger.info(pack.toString()); boolean removedRelation = pack.getHistory().remove(findOne); logger.log(Level.INFO, "Removed {0}", removedRelation); pr.save(pack); } catch (Exception ex) { logger.log(Level.SEVERE, "Wyst\u0105pi\u0142 wyj\u0105tek w trakcie wycofywania zmian: {0}", ex); } errorDao.setError(Boolean.TRUE); } errorDao.setInsertedRecords(i); return gson.toJson(errorDao); }
From source file:com.elasticgrid.amazon.sdb.impl.SimpleDBImpl.java
public void deleteDomain(String name) throws SimpleDBException { try {// ww w. ja va2 s.c om logger.log(Level.INFO, "Deleting domain {0}", name); sdb.deleteDomain(name); } catch (SDBException e) { throw new SimpleDBException("Can't delete domain " + name, e); } }
From source file:at.ac.tuwien.dsg.depic.dataassetfunctionmanagement.store.MySqlDataAssetStore.java
public void storeDataAsset(DataAsset da) { try {/*from w w w.ja va 2s .c o m*/ String daXML = JAXBUtils.marshal(da, DataAsset.class); Logger.getLogger(MySqlDataAssetStore.class.getName()).log(Level.INFO, "Prepare to Store: " + daXML); InputStream daStream = new ByteArrayInputStream(daXML.getBytes(StandardCharsets.UTF_8)); List<InputStream> listOfInputStreams = new ArrayList<InputStream>(); listOfInputStreams.add(daStream); String sql = "INSERT INTO DataAsset (dataAssetID, dataPartitionID, data) VALUES ('" + da.getDataAssetID() + "'," + da.getPartition() + ",?)"; connectionManager.ExecuteUpdateBlob(sql, listOfInputStreams); } catch (Exception ex) { Logger.getLogger(MySqlDataAssetStore.class.getName()).log(Level.SEVERE, ex.toString()); } }