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:com.levalo.contacts.view.ContactView.java
public List<Contact> doGetUserContacts() { try {/*from w ww .j av a2s . c o m*/ List<Contact> contacts = contactService.getUserContacts(); return contacts; } catch (ServiceException ex) { logger.log(Level.WARNING, ex.getMessage()); return null; } }
From source file:com.vigglet.servlet.PostJsonServlet.java
@Override protected void processRequest(HttpServletRequest req, HttpServletResponse resp, User user) throws Exception { StringWriter writer = new StringWriter(); IOUtils.copy(req.getInputStream(), writer, "UTF-8"); String theString = writer.toString(); T model = JsonUtil.read(theString, getModelClass()); if (model != null) { model = setCompany(user, model); JsonUtil.write(resp.getOutputStream(), update(req, resp, user, model)); } else {/*w w w.ja va2s .c om*/ Logger.getLogger(PostJsonServlet.class.getName()).log(Level.WARNING, "Could not read json!", theString); } }
From source file:com.almende.eve.scheduling.SimpleScheduler.java
/** * Instantiates a new abstract scheduler. * // w w w .j av a 2 s . c om * @param params * the params * @param handle * the handle */ public SimpleScheduler(final ObjectNode params, final Handler<Receiver> handle) { if (params.has("senderUrl")) { try { schedulerUrl = URIUtil.parse(params.get("senderUrl").asText()); } catch (final URISyntaxException e) { LOG.log(Level.WARNING, "Couldn't parse scheduler senderUrl from parameters.", e); } } if (schedulerUrl == null) { schedulerUrl = URIUtil.create("local:unnamed_scheduler"); } this.handle = handle; myParams = params; }
From source file:eu.optimis.ip.gui.client.resources.DbServerThread.java
public DbServerThread(PropertiesConfiguration dbConfig) { if (server == null) { server = new Server(); try {/*from w w w .j a va 2s .c o m*/ server.setLogWriter(new PrintWriter(new FileOutputStream(dbConfig.getString("logFile"), true))); } catch (FileNotFoundException ex) { Logger.getLogger(Accounting.class.getName()).log(Level.WARNING, "Log file not found. Using System.out"); server.setLogWriter(new PrintWriter(System.out)); } server.setSilent(false); server.setDatabaseName(0, dbConfig.getString("databaseName")); server.setDatabasePath(0, dbConfig.getString("databasePath")); server.setNoSystemExit(true); } }
From source file:net.bluemix.connectors.local.CouchDbLocalConfigServiceInfoCreator.java
@Override public CloudantServiceInfo createServiceInfo(final String id, final String uri) { try {//from ww w. ja v a 2 s . com return new CloudantServiceInfo(id, uri); } catch (URISyntaxException e) { LOG.logp(Level.WARNING, CouchDbLocalConfigServiceInfoCreator.class.getName(), "createServiceInfo", "Invalid URI: " + uri, e); return null; } }
From source file:com.almende.eve.algorithms.test.agents.EventAgent.java
/** * Instantiates a new event agent.//from w w w . j a va 2 s . co m * * @param id * the id * @param config * the config * @param start * the start */ public EventAgent(String id, ObjectNode config, URI start) { super(id, config); if (start != null) { try { getGraph().addNode2SFN(start, "SFN", 3, 7); } catch (IOException e) { LOG.log(Level.WARNING, "Couldn't join SFN!", e); } } events = new EventBus(getScheduler(), caller, getGraph(), "SFN"); }
From source file:mockit.integration.logging.LoggingIntegrationsTest.java
@Test public void jdkLoggingShouldLogNothing() { Logger log1 = Logger.getAnonymousLogger(); Logger log2 = Logger.getAnonymousLogger("bundle"); Logger log3 = Logger.getLogger(LoggingIntegrationsTest.class.getName()); Logger log4 = Logger.getLogger(LoggingIntegrationsTest.class.getName(), "bundle"); assertFalse(log1.isLoggable(Level.ALL)); log1.severe("testing that logger does nothing"); log2.setLevel(Level.WARNING); log2.info("testing that logger does nothing"); log3.warning("testing that logger does nothing"); log4.fine("testing that logger does nothing"); log4.finest("testing that logger does nothing"); }
From source file:examples.ExampleLogDataParsedListener.java
@Override public void logDataParsed(LogData logData, BatchProcessingContext context) { if (logData.getLevel() != null && logData.getLevel().intValue() >= Level.WARNING.intValue()) { System.out.printf("Event with level %s at %2$tH:%2$tM:%2$tS %2$te-%2$tm-%2$tY: %3$s\n", logData.getLevel(), logData.getDate(), logData.getMessage()); totalCount++;/*from www . j av a 2s. co m*/ singleFileCount++; } }
From source file:com.skcraft.launcher.persistence.Persistence.java
/** * Save an object to file, and send all errors to the log. * * @param object the object//from ww w . j a v a2 s. c o m */ public static void commitAndForget(@NonNull Object object) { try { commit(object); } catch (IOException e) { log.log(Level.WARNING, "Failed to save " + object.getClass() + ": " + object.toString(), e); } }
From source file:net.bluemix.connectors.local.IBMGraphDbLocalConfigServiceInfoCreator.java
@Override public IBMGraphDbServiceInfo createServiceInfo(String id, String uri) { try {//from w ww . ja v a 2 s . c o m return new IBMGraphDbServiceInfo(id, uri); } catch (URISyntaxException e) { LOG.logp(Level.WARNING, IBMGraphDbLocalConfigServiceInfoCreator.class.getName(), "createServiceInfo", "Invalid URI: " + uri, e); return null; } }