org.jboss.logging.Logger.warnv()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(9.2k)|赞(0)|评价(0)|浏览(218)

本文整理了Java中org.jboss.logging.Logger.warnv()方法的一些代码示例,展示了Logger.warnv()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.warnv()方法的具体详情如下:
包路径:org.jboss.logging.Logger
类名称:Logger
方法名:warnv

Logger.warnv介绍

[英]Issue a log message with a level of WARN using java.text.MessageFormat-style formatting.
[中]使用java发出警告级别的日志消息。文本MessageFormat样式格式化。

代码示例

代码示例来源:origin: wildfly/wildfly

  1. private Level convertLevelIntToEnum(int level) {
  2. switch (level) {
  3. case SEVERE:
  4. return Level.FATAL;
  5. case WARNING:
  6. return Level.WARN;
  7. case CONFIG:
  8. case INFO:
  9. return Level.INFO;
  10. case FINE:
  11. return Level.DEBUG;
  12. case FINER:
  13. case FINEST:
  14. return Level.TRACE;
  15. default:
  16. getLoggerForCategory("logging").warnv("Received message for log level {0}, but no such level is defined in SessionLog! Logging at INFO level...", level);
  17. return Level.INFO;
  18. }
  19. }

代码示例来源:origin: org.kie.server/kie-server-router-proxy

  1. public ConfigFileWatcher(String configFilePath, ConfigurationMarshaller marshaller, Configuration configuration) {
  2. this.marshaller = marshaller;
  3. this.configuration = configuration;
  4. this.toWatch = Paths.get(configFilePath);
  5. if (!Files.isDirectory(this.toWatch)) {
  6. this.toWatch = Paths.get(configFilePath).getParent();
  7. }
  8. this.toWatch = Paths.get(toWatch.toString(), "kie-server-router.json");
  9. try {
  10. if(toWatch.toFile().exists()) {
  11. lastUpdate = Files.getLastModifiedTime(toWatch).toMillis();
  12. } else {
  13. log.warnv("configuration file does not exists {0} ", this.toWatch);
  14. }
  15. } catch (IOException e) {
  16. log.error("Unable to read last modified date of routers config file", e);
  17. }
  18. }

代码示例来源:origin: kiegroup/droolsjbpm-integration

  1. public ConfigFileWatcher(String configFilePath, ConfigurationMarshaller marshaller, Configuration configuration) {
  2. this.marshaller = marshaller;
  3. this.configuration = configuration;
  4. this.toWatch = Paths.get(configFilePath);
  5. if (!Files.isDirectory(this.toWatch)) {
  6. this.toWatch = Paths.get(configFilePath).getParent();
  7. }
  8. this.toWatch = Paths.get(toWatch.toString(), "kie-server-router.json");
  9. try {
  10. if(toWatch.toFile().exists()) {
  11. lastUpdate = Files.getLastModifiedTime(toWatch).toMillis();
  12. } else {
  13. log.warnv("configuration file does not exists {0} ", this.toWatch);
  14. }
  15. } catch (IOException e) {
  16. log.error("Unable to read last modified date of routers config file", e);
  17. }
  18. }

代码示例来源:origin: org.jboss.eap/jipijapa-eclipselink

  1. private Level convertLevelIntToEnum(int level) {
  2. switch (level) {
  3. case SEVERE:
  4. return Level.FATAL;
  5. case WARNING:
  6. return Level.WARN;
  7. case CONFIG:
  8. case INFO:
  9. return Level.INFO;
  10. case FINE:
  11. return Level.DEBUG;
  12. case FINER:
  13. case FINEST:
  14. return Level.TRACE;
  15. default:
  16. getLoggerForCategory("logging").warnv("Received message for log level {0}, but no such level is defined in SessionLog! Logging at INFO level...", level);
  17. return Level.INFO;
  18. }
  19. }

代码示例来源:origin: org.jipijapa/jipijapa-eclipselink

  1. private Level convertLevelIntToEnum(int level) {
  2. switch (level) {
  3. case SEVERE:
  4. return Level.FATAL;
  5. case WARNING:
  6. return Level.WARN;
  7. case CONFIG:
  8. case INFO:
  9. return Level.INFO;
  10. case FINE:
  11. return Level.DEBUG;
  12. case FINER:
  13. case FINEST:
  14. return Level.TRACE;
  15. default:
  16. getLoggerForCategory("logging").warnv("Received message for log level {0}, but no such level is defined in SessionLog! Logging at INFO level...", level);
  17. return Level.INFO;
  18. }
  19. }

代码示例来源:origin: org.keycloak/keycloak-saml-tomcat-adapter-core

  1. return (SessionIdMapperUpdater) addTokenStoreUpdatersMethod.invoke(null, context, mapper, previousIdMapperUpdater);
  2. } catch (ClassNotFoundException ex) {
  3. log.warnv(ex, "Cannot use sessionIdMapperUpdater class {0}", idMapperSessionUpdaterClass);
  4. return previousIdMapperUpdater;
  5. } catch (NoSuchMethodException ex) {
  6. log.warnv(ex, "Cannot use sessionIdMapperUpdater class {0}", idMapperSessionUpdaterClass);
  7. return previousIdMapperUpdater;
  8. } catch (SecurityException ex) {
  9. log.warnv(ex, "Cannot use sessionIdMapperUpdater class {0}", idMapperSessionUpdaterClass);
  10. return previousIdMapperUpdater;
  11. } catch (IllegalAccessException ex) {
  12. log.warnv(ex, "Cannot use {0}.addTokenStoreUpdaters(DeploymentInfo, SessionIdMapper) method", idMapperSessionUpdaterClass);
  13. return previousIdMapperUpdater;
  14. } catch (IllegalArgumentException ex) {
  15. log.warnv(ex, "Cannot use {0}.addTokenStoreUpdaters(DeploymentInfo, SessionIdMapper) method", idMapperSessionUpdaterClass);
  16. return previousIdMapperUpdater;
  17. } catch (InvocationTargetException ex) {
  18. log.warnv(ex, "Cannot use {0}.addTokenStoreUpdaters(DeploymentInfo, SessionIdMapper) method", idMapperSessionUpdaterClass);
  19. return previousIdMapperUpdater;

代码示例来源:origin: org.keycloak/keycloak-saml-as7-adapter

  1. private static void warnIfRemoteStoreIsUsed(Cache<String, String[]> ssoCache) {
  2. final List<RemoteCacheStore> stores = getRemoteStores(ssoCache);
  3. if (stores == null || stores.isEmpty()) {
  4. return;
  5. }
  6. LOG.warnv("Unable to listen for events on remote stores configured for cache {0} (unsupported in this Infinispan limitations), logouts will not be propagated.", ssoCache.getName());
  7. }

代码示例来源:origin: ModeShape/modeshape

  1. private ModuleIdentifier moduleIdentifierFromName(String moduleName) {
  2. if (StringUtil.isBlank(moduleName)) {
  3. return null;
  4. }
  5. try {
  6. return ModuleIdentifier.fromString(moduleName.trim());
  7. } catch (IllegalArgumentException e) {
  8. LOG.warnv("{0} is not a valid module identifier", moduleName);
  9. return null;
  10. }
  11. }

代码示例来源:origin: org.kie.server/kie-server-router-proxy

  1. try {
  2. if(!toWatch.toFile().exists()) {
  3. log.warnv("configuration file does not exists {0} ", this.toWatch);
  4. Thread.sleep(sleepTime);
  5. continue;

代码示例来源:origin: kiegroup/droolsjbpm-integration

  1. try {
  2. if(!toWatch.toFile().exists()) {
  3. log.warnv("configuration file does not exists {0} ", this.toWatch);
  4. Thread.sleep(sleepTime);
  5. continue;

代码示例来源:origin: ModeShape/modeshape

  1. return moduleLoader().loadModule(moduleId).getClassLoader();
  2. } catch (ModuleLoadException e) {
  3. LOG.warnv(e,
  4. "Cannot load module from classpath entry with identifier: {0}",
  5. moduleId);

代码示例来源:origin: jbosstm/narayana

  1. public FaultOrResponse waitForResponse(String messageId, long millis) {
  2. FaultOrResponse res = responses.get(messageId);
  3. if (res == null) {
  4. throw new IllegalStateException("The messageId " + messageId + " is not waiting for response");
  5. }
  6. synchronized (res) {
  7. if (res.isEmpty()) {
  8. // wait for the response to arrive
  9. try {
  10. WSCLogger.logger.tracev("AsynchronousRegistrationMapper waitForResponse {0} {1}", messageId, millis);
  11. res.wait(millis);
  12. } catch (InterruptedException e) {
  13. WSCLogger.logger.warnv("AsynchronousRegistrationMapper waitForResponse: being interrupted and this should not happen!");
  14. }
  15. }
  16. // remove the response cos it's filled
  17. responses.remove(messageId);
  18. }
  19. WSCLogger.logger.tracev("AsynchronousRegistrationMapper addClientMessage returning isResponse={0} isFault={1}",
  20. res.isResponse(), res.isFault());
  21. return res;
  22. }

代码示例来源:origin: ModeShape/modeshape

  1. LOGGER.warnv(
  2. "Cannot deploy ModeShape webapp {0} because it cannot be located by the main modeshape module", webappName);
  3. return;

代码示例来源:origin: org.keycloak/keycloak-model-api

  1. public static boolean verify(KeycloakSession session, PasswordPolicy passwordPolicy, String password, UserCredentialValueModel credential) {
  2. String algorithm = credential.getAlgorithm() != null ? credential.getAlgorithm() : passwordPolicy.getHashAlgorithm();
  3. PasswordHashProvider provider = session.getProvider(PasswordHashProvider.class, algorithm);
  4. if (provider == null) {
  5. log.warnv("Could not find hash provider {0} for password", algorithm);
  6. return false;
  7. }
  8. return provider.verify(password, credential);
  9. }

代码示例来源:origin: org.keycloak/keycloak-model-api

  1. public static UserCredentialValueModel encode(KeycloakSession session, PasswordPolicy passwordPolicy, String rawPassword) {
  2. String algorithm = passwordPolicy.getHashAlgorithm();
  3. int iterations = passwordPolicy.getHashIterations();
  4. if (iterations < 1) {
  5. iterations = 1;
  6. }
  7. PasswordHashProvider provider = session.getProvider(PasswordHashProvider.class, passwordPolicy.getHashAlgorithm());
  8. if (provider == null) {
  9. log.warnv("Could not find hash provider {0} from password policy, using default provider {1}", algorithm, Constants.DEFAULT_HASH_ALGORITHM);
  10. provider = session.getProvider(PasswordHashProvider.class, Constants.DEFAULT_HASH_ALGORITHM);
  11. }
  12. return provider.encode(rawPassword, iterations);
  13. }

代码示例来源:origin: org.keycloak/keycloak-saml-as7-adapter

  1. LOG.warnv("Cannot determine parameters of SSO cache for deployment {0}.", host + contextPath);
  2. LOG.warnv("SSO cache mode is {0}, it is recommended to use replicated mode instead.", ssoCacheConfiguration.clustering().cacheModeString());
  3. LOG.warnv("Failed to obtain distributed session cache container, lookup={0}", cacheContainerLookup);
  4. return previousIdMapperUpdater;

代码示例来源:origin: org.keycloak/keycloak-saml-wildfly-adapter

  1. LOG.warnv("Cannot determine parameters of SSO cache for deployment {0}.", deploymentInfo.getDeploymentName());
  2. LOG.warnv("SSO cache mode is {0}, it is recommended to use replicated mode instead.", ssoCacheConfiguration.clustering().cacheModeString());
  3. LOG.warnv("Failed to obtain distributed session cache container, lookup={0}", cacheContainerLookup);
  4. return previousIdMapperUpdater;

代码示例来源:origin: thorntail/thorntail

  1. indexer.index(contentStream);
  2. } catch (IOException indexerIOException) {
  3. LOGGER.warnv(indexerIOException,
  4. "Failed parsing: {0} from archive: {1}",
  5. entry.getKey().get(),

代码示例来源:origin: io.thorntail/container

  1. indexer.index(contentStream);
  2. } catch (IOException indexerIOException) {
  3. LOGGER.warnv(indexerIOException,
  4. "Failed parsing: {0} from archive: {1}",
  5. entry.getKey().get(),

代码示例来源:origin: org.wildfly.swarm/container

  1. indexer.index(contentStream);
  2. } catch (IOException indexerIOException) {
  3. LOGGER.warnv(indexerIOException,
  4. "Failed parsing: {0} from archive: {1}",
  5. entry.getKey().get(),

相关文章