List of usage examples for java.util.logging Level WARNING
Level WARNING
To view the source code for java.util.logging Level WARNING.
Click Source Link
From source file:fitnesse.testsystems.fit.CommandRunningFitClient.java
private void closeServer() { try {/*from w ww . j a v a2 s . com*/ server.close(); } catch (IOException e) { LOG.log(Level.WARNING, "Unable to close FitClient socket server", e); } }
From source file:org.tomitribe.tribestream.registryng.service.serialization.CustomJacksonJaxbJsonProvider.java
@Override public long getSize(Object value, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {/* w w w . j a v a2s.c om*/ try { return super.getSize(value, type, genericType, annotations, mediaType); } catch (Exception e) { LOGGER.log(Level.WARNING, "Getting size for writing entity failed!", e); throw new RuntimeException(e); } }
From source file:com.screenslicer.common.Log.java
public static void warn(String message) { if (logger == null) { init("screenslicer", true); }//from ww w .j a v a 2 s .c om logger.log(Level.WARNING, "Message \"" + message + "\" ~ Current stack: " + ExceptionUtils.getStackTrace(new Throwable())); }
From source file:com.vigglet.oei.standardinspection.CopyStandardinspectionToServiceServlet.java
@Override protected void preProcessRequest(HttpServletRequest req, HttpServletResponse resp) throws IOException { StringWriter writer = new StringWriter(); IOUtils.copy(req.getInputStream(), writer, "UTF-8"); String theString = writer.toString(); User user = getUser(req);/*from w w w . j a v a 2s.c o m*/ Standardinspection model = JsonUtil.read(theString, Standardinspection.class); if (model != null) { model.setCompany(user.getCompany()); model = PostStandardinspectionServlet.update(model); Service service = new Service(); service.setCompany(model.getCompany()); service.setDate(new Date().getTime()); service.setDescription(model.getDescription()); service.setNote(model.getName()); service = ServiceUtil.getInstance().insertOrUpdate(service); int i = 0; for (Standardinspectionrow standardinspectionrow : model.getRows()) { Servicerow servicerow = new Servicerow(); servicerow.setMaterial(standardinspectionrow.getMaterial()); servicerow.setName(standardinspectionrow.getComment()); servicerow.setQuantity(standardinspectionrow.getQuantity()); servicerow.setType(standardinspectionrow.getType()); servicerow.setListorder(i++); servicerow.setService(service.getId()); ServicerowUtil.getInstance().insertOrUpdate(servicerow); } JsonUtil.write(resp.getOutputStream(), ServiceUtil.getInstance().findById(service.getId())); } else { Logger.getLogger(PostJsonServlet.class.getName()).log(Level.WARNING, "Could not read json!", theString); } }
From source file:com.neophob.sematrix.generator.Image.java
/** * load a new file./*w ww .jav a2 s . c om*/ * * @param filename the filename */ public void loadFile(String filename) { //only load if needed if (StringUtils.equals(filename, this.filename)) { LOG.log(Level.INFO, "new filename does not differ from old: " + Image.PREFIX + filename); return; } this.filename = filename; try { PImage img = Collector.getInstance().getPapplet().loadImage(Image.PREFIX + filename); if (img == null || img.height < 2) { LOG.log(Level.WARNING, "could not load " + Image.PREFIX + filename + " " + img); return; } LOG.log(Level.INFO, "resize to img " + filename + " " + internalBufferXSize + ", " + internalBufferYSize); PixelControllerResize res = Collector.getInstance().getPixelControllerResize(); img.loadPixels(); this.internalBuffer = res.resizeImage(RESIZE_TYP, img.pixels, img.width, img.height, internalBufferXSize, internalBufferYSize); img.updatePixels(); //this.internalBuffer = ColorSet.convertToColorSetImage(internalBuffer, cs); short r, g, b; int rgbColor; //greyscale it for (int i = 0; i < internalBuffer.length; i++) { rgbColor = internalBuffer[i]; r = (short) ((rgbColor >> 16) & 255); g = (short) ((rgbColor >> 8) & 255); b = (short) (rgbColor & 255); int val = (int) (r * 0.3f + g * 0.59f + b * 0.11f); internalBuffer[i] = val; } } catch (Exception e) { LOG.log(Level.WARNING, "Failed to load image {0}: {1}", new Object[] { Image.PREFIX + filename, e }); } }
From source file:com.aipo.container.gadgets.render.AipoRenderingGadgetRewriter.java
protected void loadAipoStyle(String path) { try {//from w ww . java 2 s .c o m aipoStyleCss = IOUtils.toString(ResourceLoader.open(path), "UTF-8"); } catch (IOException e) { LOG.log(Level.WARNING, e.getMessage(), e); } }
From source file:net.morematerials.manager.HandlerManager.java
public HandlerManager(MoreMaterials plugin) { this.plugin = plugin; File folder = new File(plugin.getDataFolder(), "handlers"); // We can only compile if the JDK is found. if (ToolProvider.getSystemJavaCompiler() != null) { this.prepareCompiler(new File(folder, "bin")); for (File file : (new File(folder, "src")).listFiles()) { if (file.getName().endsWith(".java")) { try { this.compile(file); } catch (Exception exception) { this.plugin.getUtilsManager().log("Error compiling handler: " + file.getName(), Level.WARNING); }/*from www. j a v a2 s .c o m*/ } } } else { this.plugin.getUtilsManager() .log("Server not using Java JDK environment, custom handlers will not function.", Level.INFO); this.plugin.getUtilsManager() .log("Ignore this error if your not trying to use your own custom handlers.", Level.INFO); } for (File file : (new File(folder, "bin")).listFiles()) { if (file.getName().endsWith(".class") && file.getName().indexOf("$") == -1) { this.load(file); } } }
From source file:com.omricat.yacc.backend.servlets.UpdateLatestCurrenciesHelper.java
void downloadCurrencies(final Writer out) throws IOException { CurrencyDataset currencyDataset = currenciesProcessor.download(); try {/* w w w. j a v a 2 s . co m*/ currenciesProcessor.writeToStore(currencyDataset); mapper.writeValue(out, currencyDataset); } catch (IOException e) { log.log(Level.WARNING, "Caught exception", e); throw e; } }
From source file:com.almende.eve.state.memory.MemoryState.java
@Override public Serializable get(final String key) { try {//from ww w .j a v a2 s . c om return properties.get(key); } catch (final Exception e) { LOG.log(Level.WARNING, "Couldn't clone object: " + key + ", returning pointer to original object.", e); return properties.get(key); } }
From source file:com.neophob.sematrix.core.output.E1_31Device.java
/** * //from w w w. j a v a 2s. c o m * @param controller */ public E1_31Device(ApplicationConfigurationHelper ph, int nrOfScreens) { super(OutputDeviceEnum.E1_31, ph, 8, nrOfScreens); this.displayOptions = ph.getE131Device(); //Get dmx specific config this.pixelsPerUniverse = ph.getE131PixelsPerUniverse(); try { String ip = ph.getE131Ip(); String sendMode = "Unicast"; if (StringUtils.startsWith(ip, MULTICAST_START)) { this.sendMulticast = true; sendMode = "Multicast"; } this.targetAdress = InetAddress.getByName(ip); this.firstUniverseId = ph.getE131StartUniverseId(); calculateNrOfUniverse(); packet = new DatagramPacket(new byte[0], 0, targetAdress, E1_31DataPacket.E131_PORT); dsocket = new DatagramSocket(); this.initialized = true; LOG.log(Level.INFO, "E1.31 device initialized, send mode: " + sendMode + ", use " + this.displayOptions.size() + " panels"); } catch (Exception e) { LOG.log(Level.WARNING, "failed to initialize E1.31 device", e); } }