List of usage examples for java.util.logging Level FINEST
Level FINEST
To view the source code for java.util.logging Level FINEST.
Click Source Link
From source file:com.avaje.ebean.springsupport.txn.SpringAwareJdbcTransactionManager.java
/** * Looks for a current Spring managed transaction and wraps/returns that as a Ebean transaction. * <p>// w w w. j av a2s.c om * Returns null if there is no current spring transaction (lazy loading outside a spring txn etc). * </p> */ public Object getCurrentTransaction() { // Get the current Spring ConnectionHolder associated to the current spring managed transaction ConnectionHolder holder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource); if (holder == null || !holder.isSynchronizedWithTransaction()) { // no current Spring transaction SpiTransaction currentEbeanTransaction = DefaultTransactionThreadLocal.get(serverName); if (currentEbeanTransaction != null) { // NOT expecting this so log WARNING String msg = "SpringTransaction - no current spring txn BUT using current Ebean one " + currentEbeanTransaction.getId(); logger.log(Level.WARNING, msg); } else if (logger.isLoggable(Level.FINEST)) { logger.log(Level.FINEST, "Spring Txn - no current transaction "); } return currentEbeanTransaction; } SpringTxnListener springTxnLister = getSpringTxnListener(); if (springTxnLister != null) { // we have already seen this transaction return springTxnLister.getTransaction(); } else { // This is a new spring transaction that we have not seen before. // "wrap" it in a SpringJdbcTransaction for use with Ebean SpringJdbcTransaction newTrans = new SpringJdbcTransaction(holder, transactionManager); // Create and register a Spring TransactionSynchronization for this transaction springTxnLister = createSpringTxnListener(newTrans); TransactionSynchronizationManager.registerSynchronization(springTxnLister); // also put in Ebean ThreadLocal DefaultTransactionThreadLocal.set(serverName, newTrans); return newTrans; } }
From source file:net.sourceforge.pmd.PMD.java
/** * Parses the given string as a database uri and returns a list of * datasources./*from w ww .j a va 2 s .co m*/ * * @param uriString * the URI to parse * @return list of data sources * @throws PMDException * if the URI couldn't be parsed * @see DBURI */ public static List<DataSource> getURIDataSources(String uriString) throws PMDException { List<DataSource> dataSources = new ArrayList<>(); try { DBURI dbUri = new DBURI(uriString); DBMSMetadata dbmsMetadata = new DBMSMetadata(dbUri); LOG.log(Level.FINE, "DBMSMetadata retrieved"); List<SourceObject> sourceObjectList = dbmsMetadata.getSourceObjectList(); LOG.log(Level.FINE, "Located {0} database source objects", sourceObjectList.size()); for (SourceObject sourceObject : sourceObjectList) { String falseFilePath = sourceObject.getPseudoFileName(); LOG.log(Level.FINEST, "Adding database source object {0}", falseFilePath); try { dataSources.add(new ReaderDataSource(dbmsMetadata.getSourceCode(sourceObject), falseFilePath)); } catch (SQLException ex) { if (LOG.isLoggable(Level.WARNING)) { LOG.log(Level.WARNING, "Cannot get SourceCode for " + falseFilePath + " - skipping ...", ex); } } } } catch (URISyntaxException e) { throw new PMDException("Cannot get DataSources from DBURI - \"" + uriString + "\"", e); } catch (SQLException e) { throw new PMDException( "Cannot get DataSources from DBURI, couldn't access the database - \"" + uriString + "\"", e); } catch (ClassNotFoundException e) { throw new PMDException("Cannot get DataSources from DBURI, probably missing database jdbc driver - \"" + uriString + "\"", e); } catch (Exception e) { throw new PMDException("Encountered unexpected problem with URI \"" + uriString + "\"", e); } return dataSources; }
From source file:com.microsoft.azure.util.TokenCache.java
public AccessToken get() throws AzureCloudException { LOGGER.log(Level.FINEST, "TokenCache: get: Get token from cache"); synchronized (tsafe) { AccessToken token = readTokenFile(); if (token == null || token.isExpiring()) { LOGGER.log(Level.FINEST, "TokenCache: get: Token is no longer valid ({0})", token == null ? null : token.getExpirationDate()); clear();// w ww.jav a 2 s . co m token = getNewToken(); } return token; } }
From source file:org.apache.reef.io.network.NetworkConnectionServiceTest.java
/** * NetworkConnectionService streaming messaging test. *///from ww w . j av a 2 s . c om @Test public void testStreamingMessagingNetworkConnectionService() throws Exception { LOG.log(Level.FINEST, name.getMethodName()); runMessagingNetworkConnectionService(new StreamingStringCodec()); }
From source file:com.ejisto.modules.dao.remote.BaseRemoteDao.java
private HttpURLConnection openConnection(String requestPath, String method) throws IOException { String destination = serverAddress + defaultIfEmpty(requestPath, "/"); log.log(Level.FINEST, "url destination: " + destination); HttpURLConnection connection = (HttpURLConnection) new URL(destination).openConnection(); connection.setDoInput(true);//from ww w. ja v a2 s. c o m connection.setDoOutput(true); if (method != null) { connection.setRequestMethod(method.toUpperCase()); } connection.connect(); return connection; }
From source file:org.apache.reef.io.data.loading.impl.AbstractEvaluatorToPartitionStrategy.java
@SuppressWarnings("rawtypes") AbstractEvaluatorToPartitionStrategy(final String inputFormatClassName, final Set<String> serializedDataPartitions) { LOG.fine("AbstractEvaluatorToPartitionStrategy injected"); Validate.notEmpty(inputFormatClassName); Validate.notEmpty(serializedDataPartitions); locationToSplits = new ConcurrentHashMap<>(); evaluatorToSplits = new ConcurrentHashMap<>(); unallocatedSplits = new LinkedBlockingQueue<>(); setUp();/*from w w w .j a v a 2 s . co m*/ final Map<DistributedDataSetPartition, InputSplit[]> splitsPerPartition = new HashMap<>(); for (final String serializedDataPartition : serializedDataPartitions) { final DistributedDataSetPartition dp = DistributedDataSetPartitionSerializer .deserialize(serializedDataPartition); final ExternalConstructor<JobConf> jobConfExternalConstructor = new JobConfExternalConstructor( inputFormatClassName, dp.getPath()); try { final JobConf jobConf = jobConfExternalConstructor.newInstance(); final InputFormat inputFormat = jobConf.getInputFormat(); final InputSplit[] inputSplits = inputFormat.getSplits(jobConf, dp.getDesiredSplits()); if (LOG.isLoggable(Level.FINEST)) { LOG.log(Level.FINEST, "Splits for partition: {0} {1}", new Object[] { dp, Arrays.toString(inputSplits) }); } this.totalNumberOfSplits += inputSplits.length; splitsPerPartition.put(dp, inputSplits); } catch (final IOException e) { throw new RuntimeException("Unable to get InputSplits using the specified InputFormat", e); } } init(splitsPerPartition); LOG.log(Level.FINE, "Total Number of splits: {0}", this.totalNumberOfSplits); }
From source file:modmanager.backend.ModificationOption.java
/** * Renames folders to be compatible to unix file systems *//*from ww w.j av a 2 s . c om*/ private void makeUnixCompatible(File path) { logger.log(Level.FINER, "Making modification compatible to UNIX filesystems (Mac, Linux, ...)"); /** * Check if the data folder is named wrong */ if (FileUtils.getFile(path, "data").exists()) { FileUtils.getFile(path, "data").renameTo(FileUtils.getFile(path, "Data")); /** * Go to data directory */ path = FileUtils.getFile(path, "Data"); logger.log(Level.FINEST, "unix: Renamed data to Data"); } else if (FileUtils.getFile(directory, "Data").exists()) { /** * Go to data directory */ path = FileUtils.getFile(path, "Data"); } /** * All top folders should be renamed to uppercase letter first */ for (File dir : path.listFiles()) { if (dir.isDirectory()) { if (Character.isLowerCase(dir.getName().charAt(0))) { /** * Silently assuming that a folder has more than one letter */ String new_name = Character.toUpperCase(dir.getName().charAt(0)) + dir.getName().substring(1); dir.renameTo(FileUtils.getFile(dir.getParentFile(), new_name)); logger.log(Level.FINEST, "unix: Renamed {0} to {1}", new Object[] { dir.getAbsolutePath(), new_name }); } } } }
From source file:com.clothcat.hpoolauto.model.HtmlGenerator.java
public static void generateAll(Model m) { HLogger.log(Level.FINEST, "In HtmlGenerator.generateAll()"); try {/*from w w w . j a v a2 s . co m*/ generateMaster(m); generatePools(m); copyStylesheet(); } catch (IOException ex) { HLogger.log(Level.SEVERE, "Caught exception in HtmlGenerator.generateAll()", ex); Logger.getLogger(HtmlGenerator.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:SuperPeer.java
@Override public synchronized Key join() throws Exception { lg.log(Level.FINEST, "join Entry."); Key rv;//from w ww. j a v a2 s .c o m String ip = RemoteServer.getClientHost(); // XXX: ID collisions need to be detected using peertable! rv = hasher.getHash(new Integer(prng.nextInt()).toString()); PeerInfo pi = new PeerInfo(rv, ip); while (peertable.contains(pi)) { rv = hasher.getHash(new Integer(prng.nextInt()).toString()); pi = new PeerInfo(rv, ip); lg.log(Level.WARNING, " Random Peer Key Collision, is your key space big enough?"); } peertable.add(pi); lg.log(Level.INFO, "!!!! Allocating Node ID " + rv + " to client at " + ip + " !!!!"); lg.log(Level.FINEST, "join Exit."); return rv; }
From source file:io.selendroid.standalone.android.impl.AbstractDevice.java
public void setVerbose() { log.setLevel(Level.FINEST); }