Search in sources :

Example 1 with LogFormatter

use of com.facebook.buck.log.LogFormatter in project buck by facebook.

the class DiffRuleKeysScriptIntegrationTest method enableVerboseRuleKeys.

@Before
public void enableVerboseRuleKeys() throws Exception {
    lastPositionInLog = 0;
    ruleKeyBuilderLogger = Logger.get(RuleKeyBuilder.class);
    previousRuleKeyBuilderLevel = ruleKeyBuilderLogger.getLevel();
    ruleKeyBuilderLogger.setLevel(Level.FINER);
    Path fullLogFilePath = tmp.getRoot().resolve(getLogFilePath());
    Files.createDirectories(fullLogFilePath.getParent());
    FileHandler handler = new FileHandler(fullLogFilePath.toString());
    handler.setFormatter(new LogFormatter());
    ruleKeyBuilderLogger.addHandler(handler);
}
Also used : Path(java.nio.file.Path) LogFormatter(com.facebook.buck.log.LogFormatter) FileHandler(java.util.logging.FileHandler) Before(org.junit.Before)

Aggregations

LogFormatter (com.facebook.buck.log.LogFormatter)1 Path (java.nio.file.Path)1 FileHandler (java.util.logging.FileHandler)1 Before (org.junit.Before)1