@Override protected void finalize() throws Throwable { super.finalize(); if (commitRequired()) { WorldEdit.logger.warning("####### LEFTOVER BUFFER BLOCKS DETECTED #######"); WorldEdit.logger.warning("This means that some code did not flush their EditSession."); WorldEdit.logger.log(Level.WARNING, "Here is a stacktrace from the creation of this EditSession:", stacktrace); } } }
/** * Creates a hudson.PluginStrategy, looking at the corresponding system property. */ protected PluginStrategy createPluginStrategy() { String strategyName = SystemProperties.getString(PluginStrategy.class.getName()); if (strategyName != null) { try { Class<?> klazz = getClass().getClassLoader().loadClass(strategyName); Object strategy = klazz.getConstructor(PluginManager.class) .newInstance(this); if (strategy instanceof PluginStrategy) { LOGGER.info("Plugin strategy: " + strategyName); return (PluginStrategy) strategy; } else { LOGGER.warning("Plugin strategy (" + strategyName + ") is not an instance of hudson.PluginStrategy"); } } catch (ClassNotFoundException e) { LOGGER.warning("Plugin strategy class not found: " + strategyName); } catch (Exception e) { LOGGER.log(WARNING, "Could not instantiate plugin strategy: " + strategyName + ". Falling back to ClassicPluginStrategy", e); } LOGGER.info("Falling back to ClassicPluginStrategy"); } // default and fallback return new ClassicPluginStrategy(this); }
/** * This method is to be called by generated code only. It uses Java * reflection to load the dependencies' descriptors. */ public static void internalBuildGeneratedFileFrom( final String[] descriptorDataParts, final Class<?> descriptorOuterClass, final String[] dependencies, final String[] dependencyFileNames, final InternalDescriptorAssigner descriptorAssigner) { List<FileDescriptor> descriptors = new ArrayList<FileDescriptor>(); for (int i = 0; i < dependencies.length; i++) { try { Class<?> clazz = descriptorOuterClass.getClassLoader().loadClass(dependencies[i]); descriptors.add( (FileDescriptor) clazz.getField("descriptor").get(null)); } catch (Exception e) { // We allow unknown dependencies by default. If a dependency cannot // be found we only generate a warning. logger.warning("Descriptors for \"" + dependencyFileNames[i] + "\" can not be found."); } } FileDescriptor[] descriptorArray = new FileDescriptor[descriptors.size()]; descriptors.toArray(descriptorArray); internalBuildGeneratedFileFrom( descriptorDataParts, descriptorArray, descriptorAssigner); }
public void taskStart(int stageId, long taskId) { if (!stages.containsKey(stageId)) { logger.warning(String.format("Spark stage %d could not be found for task progress reporting.", stageId)); return; } removeTask(stageId, taskId); List<Long> at = activeTasks.getOrDefault(stageId, new ArrayList<Long>()); at.add(taskId); activeTasks.put(stageId, at); }
logger.info("自定义词典开始加载:" + mainPath); if (loadDat(mainPath, dat)) return true; TreeMap<String, CoreDictionary.Attribute> map = new TreeMap<String, CoreDictionary.Attribute>(); logger.info("以默认词性[" + defaultNature + "]加载自定义词典" + p + "中……"); boolean success = load(p, defaultNature, map, customNatureCollector); if (!success) logger.warning("失败:" + p); logger.warning("没有加载到任何词条"); logger.info("正在构建DoubleArrayTrie……"); dat.build(map); if (isCache) for (Map.Entry<String, CoreDictionary.Attribute> entry : map.entrySet()) attributeList.add(entry.getValue()); out.writeInt(attributeList.size()); for (CoreDictionary.Attribute attribute : attributeList) logger.warning("自定义词典" + mainPath + "缓存失败!\n" + TextUtility.exceptionToString(e));
errors.add(new ValidationError( getClass(), "serviceType", errors.add(new ValidationError( getClass(), "serviceId", if(actionErrors.size() > 0) { log.warning("Discarding invalid action of service '" + getServiceId() + "': " + action.getName()); for (ValidationError actionError : actionErrors) { log.warning("Invalid action '" + action.getName() + "': " + actionError);
additionalLinksCount = 0; for (int sentI = 0; sentI < orderedMentionsBySentence.size(); sentI++) { List<Mention> orderedMentions = orderedMentionsBySentence.get(sentI); for (int mentionI = 0; mentionI < orderedMentions.size(); mentionI++) { for(int i = 0; i < l.size(); i++) { for(int j = 0; j < l.size(); j++) { if(l.get(i).headString.equals(l.get(j).headString) && CorefCluster c2 = corefClusters.get(m2.corefClusterID); if (c2 == null) { logger.warning("NO corefcluster id " + m2.corefClusterID); if(currentSieve==0) { scoreSingleDoc = new ArrayList<>(); scoreSingleDoc.add(new ScorerPairwise()); scoreSingleDoc.get(currentSieve).calculateScore(document); additionalCorrectLinksCount = (int) scoreSingleDoc.get(currentSieve).precisionNumSum; additionalLinksCount = (int) scoreSingleDoc.get(currentSieve).precisionDenSum; } else { scoreSingleDoc.add(new ScorerPairwise()); scoreSingleDoc.get(currentSieve).calculateScore(document); additionalCorrectLinksCount = (int) (scoreSingleDoc.get(currentSieve).precisionNumSum - scoreSingleDoc.get(currentSieve-1).precisionNumSum);
protected void execute() throws RouterException { List<NetworkAddress> activeStreamServers = getUpnpService().getRouter().getActiveStreamServers(null); if (activeStreamServers.size() == 0) { log.fine("Aborting notifications, no active stream servers found (network disabled?)"); return; } // Prepare it once, it's the same for each repetition List<Location> descriptorLocations = new ArrayList<>(); for (NetworkAddress activeStreamServer : activeStreamServers) { descriptorLocations.add( new Location( activeStreamServer, getUpnpService().getConfiguration().getNamespace().getDescriptorPathString(getDevice()) ) ); } for (int i = 0; i < getBulkRepeat(); i++) { try { for (Location descriptorLocation : descriptorLocations) { sendMessages(descriptorLocation); } // UDA 1.0 is silent about this but UDA 1.1 recomments "a few hundred milliseconds" log.finer("Sleeping " + getBulkIntervalMilliseconds() + " milliseconds"); Thread.sleep(getBulkIntervalMilliseconds()); } catch (InterruptedException ex) { log.warning("Advertisement thread was interrupted: " + ex); } } }
/** * Lists up additional bundled plugins from the system property {@code hudson.bundled.plugins}. * Since 1.480 glob syntax is supported. * For use in the "mvn hudson-dev:run". * TODO: maven-hpi-plugin should inject its own InitStrategy instead of having this in the core. */ protected void getBundledPluginsFromProperty(final List<File> r) { String hplProperty = SystemProperties.getString("hudson.bundled.plugins"); if (hplProperty != null) { for (String hplLocation : hplProperty.split(",")) { File hpl = new File(hplLocation.trim()); if (hpl.exists()) { r.add(hpl); } else if (hpl.getName().contains("*")) { try { new DirScanner.Glob(hpl.getName(), null).scan(hpl.getParentFile(), new FileVisitor() { @Override public void visit(File f, String relativePath) throws IOException { r.add(f); } }); } catch (IOException x) { LOGGER.log(Level.WARNING, "could not expand " + hplLocation, x); } } else { LOGGER.warning("bundled plugin " + hplLocation + " does not exist"); } } } }
logger.warning("读取" + path + "失败" + e); return false; for (Map.Entry<String, V> entry : entrySet) keyList.add(entry.getKey()); valueList.add(entry.getValue()); logger.warning("trie建立失败"); return false; logger.info(path + "加载成功,耗时" + (System.currentTimeMillis() - start) + "ms"); saveDat(path + BIN_EXT, valueList); return true;
if (!(appender instanceof ConsoleAppender || appender instanceof FileAppender)) { appenders.add(appender); logFileName = new File(loader.getBaseDirectory(), logFileName).getAbsolutePath(); LoggingInitializer.LOGGER.fine( "Non-absolute pathname detected for logfile. Setting logfile relative to data dir."); LoggingInitializer.LOGGER.fine("Logging output to file '" + logFileName + "'"); } else if (gslf != null) { LoggingInitializer.LOGGER.warning( "'log4j.appender.geoserverlogfile' appender is defined, but isn't a FileAppender. GeoServer won't control the file-based logging."); } else { LoggingInitializer.LOGGER.warning( "'log4j.appender.geoserverlogfile' appender isn't defined. GeoServer won't control the file-based logging."); LoggingInitializer.LOGGER.info( "Suppressing StdOut logging. If you want to see GeoServer logs, be sure to look in '" + logFileName LogManager.getRootLogger().addAppender(appender); LoggingInitializer.LOGGER.fine( "FINISHED CONFIGURING GEOSERVER LOGGING -------------------------");
if (LOG.isLoggable(Level.FINE)) { LOG.fine("Skipping empty inline tag of @response.param in method " + methodDoc.qualifiedName() + ": " + tagName); break; default: LOG.warning("Unknown inline tag of @response.param in method " + methodDoc.qualifiedName() + ": " + tagName + " (value: " + tagText + ")"); responseDoc.getWadlParams().add(wadlParam); representationDoc.setDoc(tag.text()); } else { LOG.warning("Unknown response representation tag " + tag.name()); responseDoc.getRepresentations().add(representationDoc);
boolean sentinelAvailable = false; log.info("Trying to find master from available Sentinels..."); log.fine("Connecting to Sentinel " + hap); if (masterAddr == null || masterAddr.size() != 2) { log.warning("Can not get master addr, master name: " + masterName + ". Sentinel: " + hap + "."); continue; log.fine("Found Redis master at " + master); break; } catch (JedisException e) { log.warning("Cannot get master address from sentinel running @ " + hap + ". Reason: " + e + ". Trying next one."); } finally { log.info("Redis master running at " + master + ", starting Sentinel listeners...");
logger.fine(timeStamp); logger.fine(props.toString()); Constants.printConstants(logger); logger.warning("No mention finder specified, but not using gold mentions"); runAndScoreCoref(corefSystem, mentionExtractor, props, timeStamp); } catch (Exception ex) { logger.log(Level.SEVERE, "ERROR in running coreference", ex); logger.info("done"); String endTimeStamp = Calendar.getInstance().getTime().toString().replaceAll("\\s", "-"); logger.fine(endTimeStamp);
@VisibleForTesting /*package*/ void install(Channel channel, @CheckForNull SlaveComputer c) { if (pingTimeoutSeconds < 1 || pingIntervalSeconds < 1) { LOGGER.warning("Agent ping is disabled"); return; } // set up ping from both directions, so that in case of a router dropping a connection, // both sides can notice it and take compensation actions. try { channel.call(new SetUpRemotePing(pingTimeoutSeconds, pingIntervalSeconds)); LOGGER.fine("Set up a remote ping for " + channel.getName()); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Failed to set up a ping for " + channel.getName(), e); } setUpPingForChannel(channel, c, pingTimeoutSeconds, pingIntervalSeconds, true); }
@Override public void run() { try { connectLatch.await(timeout, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { if (logger.isLoggable(Level.WARNING)) { logger.log(Level.WARNING, e.getMessage()); } } if (connectLatch.getCount() != 0) { if (logger.isLoggable(Level.WARNING)) { logger.warning("Failed to establish connection in " + timeout + "ms. " + "Forcing disconnect."); } try { self.disconnectChannel(); } catch (IOException e) { if (logger.isLoggable(Level.WARNING)) { logger.log(Level.WARNING, e.getMessage()); } } } } }, "blc-disconnect-" + hostname + ":" + port);
/** * Builds the map from unigram to unigramID. Also finds the startWordID and * endWordID. * * @param dictionary * */ private void buildUnigramIDMap() { int missingWords = 0; if (unigramIDMap == null) unigramIDMap = new HashMap<Word, Integer>(); for (int i = 0; i < words.length; i++) { Word word = dictionary.getWord(words[i]); if (word == null) { logger.warning("The dictionary is missing a phonetic transcription for the word '" + words[i] + "'"); missingWords++; } unigramIDMap.put(word, i); if (logger.isLoggable(Level.FINE)) logger.fine("Word: " + word); } if (missingWords > 0) logger.warning("Dictionary is missing " + missingWords + " words that are contained in the language model."); }
/** * Save properties to a file. */ public void store() { try (BufferedWriter writer = new BufferedWriter(new FileWriter(getPreferencesFile()))) { properties.store(writer, "GCViewer preferences"); } catch (IOException e) { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.warning("could not store preferences (" + e.toString() + ")"); } } }
julLogger.finest("Message1"); julLogger.finer("Message1"); julLogger.fine("Message1"); julLogger.info("Message1"); julLogger.warning("Message1"); julLogger.severe("Message1"); julLogger.fine("Message2"); julLogger.info("Message2"); julLogger.warning("Message2"); julLogger.severe("Message2"); assertThat(julLogger.isLoggable(java.util.logging.Level.FINEST)).isTrue(); assertThat(julLogger.isLoggable(java.util.logging.Level.FINER)).isTrue(); assertThat(julLogger.isLoggable(java.util.logging.Level.FINE)).isTrue(); assertThat(julLogger.isLoggable(java.util.logging.Level.INFO)).isTrue(); assertThat(julLogger.isLoggable(java.util.logging.Level.SEVERE)).isTrue(); julLogger.fine("Message3"); julLogger.info("Message3"); julLogger.warning("Message3"); julLogger.severe("Message3");