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:net.sylvek.sharemyposition.server.RetrievePositionServletImpl.java
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { final String uuid = request.getParameter(UpdatePositionServletImpl.PARAMETER_UUID); if (uuid == null || uuid.trim().equals("")) { response.sendError(HttpStatus.SC_BAD_REQUEST, "?uuid= mandatory"); }/* w w w. j a v a 2 s .com*/ final MemcacheService syncCache = MemcacheServiceFactory.getMemcacheService(); syncCache.setErrorHandler(ErrorHandlers.getConsistentLogAndContinue(Level.INFO)); final Object inMemory = syncCache.get(uuid); if (inMemory == null) { response.sendError(HttpStatus.SC_NOT_FOUND, "element not found"); } final Cache cache = Cache.from(inMemory); response.getWriter().write(cache.toString()); }
From source file:neembuu.uploader.captcha.ImagePanel.java
public final void update(URL imageFileUrl, HttpContext httpContext) { try {/* www . j a v a 2 s .c o m*/ HttpClient httpClient = NUHttpClient.getHttpClient(); HttpGet httpGet = new HttpGet(imageFileUrl.toURI()); HttpResponse httpresponse = httpClient.execute(httpGet, httpContext); byte[] imageInByte = EntityUtils.toByteArray(httpresponse.getEntity()); InputStream in = new ByteArrayInputStream(imageInByte); image = ImageIO.read(in); //image = ImageIO.read(imageFileUrl); } catch (Exception ex) { NULogger.getLogger().log(Level.INFO, "ImagePanel exception: {0}", ex.getMessage()); } }
From source file:com.mmone.gpdati.allotment.reader.AvailCrud.java
private static int modifyAllotment(XmlRpcClient client, java.util.Date dateStart, java.util.Date dateEnd, String action, int availability, int reservation, Integer invCode, Integer hotelCode) { Vector parameters = new Vector(); DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); parameters.add(new Integer(hotelCode)); //1 parameters.add(new Integer(invCode)); //2 //todo gestire con inventario unico -1 int rate = 1; ///fisso nr da verificare per iu parameters.add(new Integer(rate)); //3 offerta parameters.add(new Integer(availability)); //4 disponibilit parameters.add(new Integer(reservation)); //5 prenotazione parameters.add(action); //6 Azione : set,increase,decrease parameters.add(df.format(dateStart).toString()); //7 parameters.add(df.format(dateEnd).toString()); //8 Vector result = new Vector(); int ret = XRPC_SET_ALLOTMENT_RESULT_ERROR; String logData = "hotelCode=" + hotelCode + " - invCode=" + invCode + " - offerta=" + rate + " - availability=" + availability + " - reservation=" + reservation + " - action=" + action + " - dateStart=" + df.format(dateStart).toString() + " - dateEnd=" + df.format(dateEnd).toString() ;//from www.j ava2 s. c o m Logger.getLogger("AvailCrud").log(Level.INFO, logData); try { result = (Vector) client.execute("backend.modifyAllotment", parameters); } catch (Exception e) { Logger.getLogger("AvailCrud").log(Level.SEVERE, "", e); // addError(ResponseBuilder.EWT_UNKNOWN, ResponseBuilder.ERR_SYSTEM_ERROR, "Error on updating allotment (modifyAllotment)"); return ret; } try { Map hret = (Map) result.get(0); ret = new Integer((String) hret.get("unique_allotment_service_response")); } catch (Exception e) { } Map hret = (Map) result.get(0); ret = new Integer((String) hret.get("unique_allotment_service_response")); Logger.getLogger("AvailCrud").log(Level.INFO, "Xrpc done "); return ret; }
From source file:com.minhthuong.pfi.controller.PFIHelpController.java
@RenderMapping public String show() { log.log(Level.INFO, "show.START"); return "help"; }
From source file:com.oic.net.WebSocketListener.java
@OnWebSocketConnect public void onConnect(Session session) { login = LoginStatus.NOLOGIN;/*w ww .j a va2 s .c om*/ this.session = session; Connections.addConnection(this);//?? LOG.log(Level.INFO, "connection :{0}", session.getRemoteAddress());//Logging }
From source file:org.jaqpot.core.service.filter.excmappers.JsonMappingExceptionMapper.java
@Override public Response toResponse(JsonMappingException exception) { LOG.log(Level.INFO, "JaqpotNotAuthorizedExceptionMapper exception caught", exception); StringWriter sw = new StringWriter(); exception.printStackTrace(new PrintWriter(sw)); String details = sw.toString(); ErrorReport error = ErrorReportBuilder.builderRandomId().setCode("JsonMappingError") .setMessage(exception.getMessage()).setDetails(details).setHttpStatus(400).build(); return Response.ok(error, MediaType.APPLICATION_JSON).status(Response.Status.BAD_REQUEST).build(); }
From source file:org.openspaces.bigdata.processor.TweetArchiveFilter.java
@Override public void onSuccess(SpaceDocument[] tweets, GigaSpace gigaSpace, TransactionStatus txStatus, Object source) throws RuntimeException { for (SpaceDocument tweet : tweets) { log.log(Level.INFO, "Archived tweet " + tweet.getProperty("Id")); }//from w w w . j a v a2 s.co m }
From source file:org.geoserver.wps.UnsupportedParameterTypeProcessFilter.java
@Override public void setApplicationContext(ApplicationContext context) throws BeansException { processBlacklist.clear();// w w w . jav a 2s . c o m for (ProcessFactory pf : Processors.getProcessFactories()) { int count = 0; for (Name name : pf.getNames()) { try { // check inputs for (Parameter<?> p : pf.getParameterInfo(name).values()) { List<ProcessParameterIO> ppios = ProcessParameterIO.findAll(p, context); if (ppios.isEmpty()) { LOGGER.log(Level.INFO, "Blacklisting process " + name.getURI() + " as the input " + p.key + " of type " + p.type + " cannot be handled"); processBlacklist.add(name); } } // check outputs for (Parameter<?> p : pf.getResultInfo(name, null).values()) { List<ProcessParameterIO> ppios = ProcessParameterIO.findAll(p, context); if (ppios.isEmpty()) { LOGGER.log(Level.INFO, "Blacklisting process " + name.getURI() + " as the output " + p.key + " of type " + p.type + " cannot be handled"); processBlacklist.add(name); } } } catch (Throwable t) { processBlacklist.add(name); } if (!processBlacklist.contains(name)) { count++; } } LOGGER.info("Found " + count + " bindable processes in " + pf.getTitle()); } }
From source file:net.sf.jsqlparser.test.select.SpecialOracleTest.java
@Test public void testAllSqlsParseDeparse() throws IOException { int count = 0; int success = 0; File[] sqlTestFiles = SQLS_DIR.listFiles(); for (File file : sqlTestFiles) { if (file.isFile()) { count++;//from www. j ava 2 s . c o m LOG.log(Level.INFO, "testing {0}", file.getName()); String sql = FileUtils.readFileToString(file); try { assertSqlCanBeParsedAndDeparsed(sql, true); success++; LOG.info(" -> SUCCESS"); } catch (JSQLParserException ex) { //LOG.log(Level.SEVERE, null, ex); LOG.log(Level.INFO, " -> PROBLEM {0}", ex.toString()); } catch (Exception ex) { LOG.log(Level.INFO, " -> PROBLEM {0}", ex.toString()); } } } LOG.log(Level.INFO, "tested {0} files. got {1} correct parse results", new Object[] { count, success }); assertTrue(success >= 129); }
From source file:io.microprofile.showcase.speaker.persistence.SpeakerDAO.java
@PostConstruct private void initStore() { Logger.getLogger(SpeakerDAO.class.getName()).log(Level.INFO, "Initialise speaker DAO from bootstrap data"); final Set<Speaker> featured = new HashSet<>(0); for (final Venue venue : this.venues) { featured.addAll(venue.getSpeakers()); }//from w ww . j a v a 2 s . c o m final AtomicInteger idc = new AtomicInteger(0); this.bootstrapData.getSpeaker().forEach(bootstrap -> { final int intId = Integer.valueOf(bootstrap.getId()); if (intId > idc.get()) { idc.set(intId); } final String id = String.valueOf(intId); final String[] names = bootstrap.getFullName().split(" "); final Speaker sp = new Speaker(); sp.setId(id); sp.setNameFirst(names[0].trim()); sp.setNameLast(names[1].trim()); sp.setOrganization(bootstrap.getCompany()); sp.setBiography(bootstrap.getJobTitle()); sp.setPicture("assets/images/unknown.jpg"); appendFeatured(featured, sp); this.speakers.put(id, sp); }); for (final Speaker fs : featured) { boolean found = false; for (final Speaker sp : this.speakers.values()) { if (fs.getNameFirst().toLowerCase().equals(sp.getNameFirst().toLowerCase()) && fs.getNameLast().toLowerCase().equals(sp.getNameLast().toLowerCase())) { found = true; break; } } if (!found) { fs.setId(String.valueOf(idc.incrementAndGet())); this.speakers.put(fs.getId(), fs); } } //TODO - Merge back to source json }