Skip to content
Discussion options

You must be logged in to vote

Do you know how I can convert:

  private static void reset() throws MalformedURLException {
    for (Logger logger : getCurrentLoggers()) {
      logger.setLevel(null);
    }

    String path = System.getProperty(JAVA_OPTIONS_LOG_CONFIG);
    if (Strings.isNullOrEmpty(path)) {
      PropertyConfigurator.configure(Loader.getResource(LOG_CONFIGURATION));
    } else {
      PropertyConfigurator.configure(URI.create(path).toURL());
    }
  }

  @SuppressWarnings({"unchecked", "JdkObsolete"})
  private static ImmutableList<Logger> getCurrentLoggers() {
    return ImmutableList.copyOf(Iterators.forEnumeration(LogManager.getCurrentLoggers()));
  }

to log4j2?

Log4j 1.x didn’t have a separate C…

Replies: 6 comments 23 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@paladox
Comment options

Comment options

You must be logged in to vote
8 replies
@paladox
Comment options

@ppkarwasz
Comment options

@paladox
Comment options

@ppkarwasz
Comment options

Answer selected by paladox
@paladox
Comment options

Comment options

You must be logged in to vote
14 replies
@ppkarwasz
Comment options

@paladox
Comment options

@paladox
Comment options

@paladox
Comment options

@ppkarwasz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants