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.bmw.yamaica.ea.core.internal.EA2FrancaCommandHandler.java
private void setOptionValues(CommandLine line) { if (line.hasOption(CLI_EA_PROJECT_PATH)) { eaProject = line.getOptionValue(CLI_EA_PROJECT_PATH); }//from w w w. j a v a 2 s . com if (line.hasOption(CLI_EA_IMPORT_PATH)) { rootPackage = line.getOptionValue(CLI_EA_IMPORT_PATH); } if (line.hasOption(CLI_EA_DEST_PATH)) { francaPath = line.getOptionValue(CLI_EA_DEST_PATH); if (!FileHelper.isFilenameValid(francaPath)) { LOGGER.log(Level.INFO, String.format("Specified %s [%s] is not valid", CLI_EA_DEST_PATH, francaPath)); francaPath = null; } } if (line.hasOption(CLI_EA_NODE_PATH)) { nodePath = line.getOptionValue(CLI_EA_NODE_PATH); } // Sets username and password. eaAuthenticationHandler.setOptionValues(line); }
From source file:lh.api.showcase.server.lh.api.offers.OffersRequestFactoryImplTest.java
@Test public void shouldConstructSeatMapsRequestUri() throws URISyntaxException { // e.g., https://api.lufthansa.com/v1/offers/seatmaps/LH741/KIX/FRA/2015-06-25/C OffersRequestFactoryImpl reqFact = new OffersRequestFactoryImpl(); URI constructedUri = reqFact.getRequestUri((NameValuePair) new BasicNameValuePair("seatmaps", ""), (List<NameValuePair>) Arrays.asList((NameValuePair) new BasicNameValuePair("LH741", ""), (NameValuePair) new BasicNameValuePair("KIX", ""), (NameValuePair) new BasicNameValuePair("FRA", ""), (NameValuePair) new BasicNameValuePair("2015-06-25", ""), (NameValuePair) new BasicNameValuePair("C", "")), null);/* ww w .ja va 2 s .com*/ URI referenceUri = new URI("https://api.lufthansa.com/v1/offers/seatmaps/LH741/KIX/FRA/2015-06-25/C"); logger.log(Level.INFO, "constructed: " + constructedUri.toString()); logger.log(Level.INFO, "reference: " + referenceUri.toString()); assertTrue(referenceUri.equals(constructedUri)); }
From source file:de.static_interface.sinklibrary.Logger.java
@Override public void info(String message) { log(Level.INFO, message); }
From source file:com.elasticgrid.amazon.sdb.impl.SimpleDBImpl.java
public Domain findDomain(String name) throws SimpleDBException { try {/*from w w w . j ava 2 s . c o m*/ logger.log(Level.INFO, "Searching for domain {0}", name); return new DomainImpl(sdb.getDomain(name)); } catch (SDBException e) { throw new SimpleDBException("Can't find domain " + name, e); } }
From source file:lh.api.showcase.server.lh.api.opperations.OperationsRequestFactoryImplTest.java
@Test public void shouldConstructScheduleRequestUri() throws URISyntaxException { // e.g., https://api.lufthansa.com/v1/operations/schedules/FRA/KIX/2014-11-01?directFlights=true OperationsRequestFactoryImpl reqFact = new OperationsRequestFactoryImpl(); URI constructedUri = reqFact.getRequestUri((NameValuePair) new BasicNameValuePair("schedules", ""), (List<NameValuePair>) Arrays.asList((NameValuePair) new BasicNameValuePair("FRA", ""), (NameValuePair) new BasicNameValuePair("KIX", ""), (NameValuePair) new BasicNameValuePair("2014-11-01", "")), Arrays.asList((NameValuePair) new BasicNameValuePair("directFlights", "true"))); URI referenceUri = new URI( "https://api.lufthansa.com/v1/operations/schedules/FRA/KIX/2014-11-01?directFlights=true"); logger.log(Level.INFO, "constructed: " + constructedUri.toString()); logger.log(Level.INFO, "reference: " + referenceUri.toString()); assertTrue(referenceUri.equals(constructedUri)); }
From source file:org.newinstance.tnt.service.TaskServiceImpl.java
public void deleteTask(final Task task) { final Task taskToDelete = taskRepository.findOne(task.getId()); LOG.log(Level.INFO, "Deleting task: {0}", taskToDelete.toString()); taskRepository.delete(taskToDelete); }
From source file:net.sf.maltcms.chromaui.features.spi.FeatureTable.java
public static RealMatrix normalize(RealMatrix sourceMatrix, boolean center, boolean normalize) { RealMatrix normalized = MatrixUtils.createRealMatrix(sourceMatrix.getRowDimension(), sourceMatrix.getColumnDimension()); for (int col = 0; col < sourceMatrix.getColumnDimension(); col++) { double[] columnVector = sourceMatrix.getColumn(col); double mean = StatUtils.mean(columnVector); double stdev = Math.sqrt(StatUtils.variance(columnVector, mean)); Logger.getLogger(FeatureTable.class.getName()).log(Level.INFO, "column {0}, mean={1} stdev={2}", new Object[] { col, mean, stdev }); for (int j = 0; j < columnVector.length; j++) { normalized.setEntry(j, col, (sourceMatrix.getEntry(j, col) - mean) / stdev); }//w w w . ja va2s . c om } return normalized; }
From source file:ductive.log.JDKToCommonsHandler.java
@Override public void publish(LogRecord record) { String name = record.getLoggerName(); Log log = logs.get(name);/*from ww w. j a v a 2 s.c o m*/ if (log == null) logs.put(name, log = LogFactory.getLog(name)); String message = record.getMessage(); Throwable ex = record.getThrown(); Level level = record.getLevel(); if (Level.SEVERE == level) log.error(message, ex); else if (Level.WARNING == level) log.warn(message, ex); else if (Level.INFO == level) log.info(message, ex); else if (Level.CONFIG == level) log.debug(message, ex); else log.trace(message, ex); }
From source file:edu.harvard.iq.dataverse.batch.util.LoggingUtil.java
/** * check if the directory for log files exists, and create if necessary */// w ww.ja v a 2 s .co m private static void checkCreateLogDirectory(String logDir) { try { File d = new File(logDir); if (!d.exists()) { logger.log(Level.INFO, "log directory: " + d.getAbsolutePath() + " absent, trying to create"); d.mkdirs(); if (!d.exists()) { logger.log(Level.SEVERE, "unable to create log directory: " + d.getAbsolutePath()); } else { logger.log(Level.INFO, "log directory: " + d.getAbsolutePath() + " created"); } } } catch (SecurityException e) { logger.log(Level.SEVERE, "security exception checking / creating log directory: " + logDir); } }
From source file:at.ac.tuwien.swa13.swazam.NetworkConnection.java
public void makeRequest(String taskId, String username, ISong song) { System.out.println("Telling server about " + taskId + ": Found " + song.toString()); try {/* w w w . j a v a 2s . com*/ HttpClient client = new DefaultHttpClient(); HttpPost postRequest = new HttpPost("http://" + server + ":8080/swazam-server/result"); postRequest.addHeader("Content-Type", "application/x-www-form-urlencoded"); postRequest.addHeader("Cache-Control", "no-cache"); List<NameValuePair> nvps = new ArrayList<NameValuePair>(); nvps.add(new BasicNameValuePair("id", taskId)); nvps.add(new BasicNameValuePair("user", username)); nvps.add(new BasicNameValuePair("result", buildMetadataBody(song))); UrlEncodedFormEntity songEntity = new UrlEncodedFormEntity(nvps); postRequest.setEntity(songEntity); HttpResponse response = client.execute(postRequest); BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); String line = ""; while ((line = rd.readLine()) != null) { Logger.getLogger(NetworkConnection.class.getName()).log(Level.INFO, line); } } catch (IOException ex) { Logger.getLogger(NetworkConnection.class.getName()).log(Level.SEVERE, null, ex); } }