use of com.facebook.airlift.log.Logging in project presto by prestodb.
the class Console method initializeLogging.
private static void initializeLogging(String logLevelsFile) {
// unhook out and err while initializing logging or logger will print to them
PrintStream out = System.out;
PrintStream err = System.err;
try {
LoggingConfiguration config = new LoggingConfiguration();
if (logLevelsFile == null) {
System.setOut(new PrintStream(nullOutputStream()));
System.setErr(new PrintStream(nullOutputStream()));
config.setConsoleEnabled(false);
} else {
config.setLevelsFile(logLevelsFile);
}
Logging logging = Logging.initialize();
logging.configure(config);
} finally {
System.setOut(out);
System.setErr(err);
}
}
use of com.facebook.airlift.log.Logging in project presto by prestodb.
the class HiveQueryRunner method setupLogging.
private static void setupLogging() {
Logging logging = Logging.initialize();
logging.setLevel("com.facebook.presto.event", WARN);
logging.setLevel("com.facebook.presto.security.AccessControlManager", WARN);
logging.setLevel("com.facebook.presto.server.PluginManager", WARN);
logging.setLevel("com.facebook.airlift.bootstrap.LifeCycleManager", WARN);
logging.setLevel("org.apache.parquet.hadoop", WARN);
logging.setLevel("org.eclipse.jetty.server.handler.ContextHandler", WARN);
logging.setLevel("org.eclipse.jetty.server.AbstractConnector", WARN);
logging.setLevel("org.glassfish.jersey.internal.inject.Providers", ERROR);
logging.setLevel("parquet.hadoop", WARN);
}
use of com.facebook.airlift.log.Logging in project presto by prestodb.
the class PrestoBenchmarkDriver method initializeLogging.
@SuppressWarnings("UseOfSystemOutOrSystemErr")
public static void initializeLogging(boolean debug) {
// unhook out and err while initializing logging or logger will print to them
PrintStream out = System.out;
PrintStream err = System.err;
try {
if (debug) {
Logging logging = Logging.initialize();
logging.configure(new LoggingConfiguration());
logging.setLevel("com.facebook.presto", Level.DEBUG);
} else {
System.setOut(new PrintStream(nullOutputStream()));
System.setErr(new PrintStream(nullOutputStream()));
Logging logging = Logging.initialize();
logging.configure(new LoggingConfiguration());
logging.disableConsole();
}
} finally {
System.setOut(out);
System.setErr(err);
}
}
use of com.facebook.airlift.log.Logging in project presto by prestodb.
the class PrestoSparkQueryRunner method setupLogging.
private static void setupLogging() {
Logging logging = Logging.initialize();
logging.setLevel("org.apache.spark", WARN);
logging.setLevel("org.spark_project", WARN);
logging.setLevel("com.facebook.presto.spark", WARN);
logging.setLevel("org.apache.spark.util.ClosureCleaner", ERROR);
logging.setLevel("com.facebook.presto.security.AccessControlManager", WARN);
logging.setLevel("com.facebook.presto.server.PluginManager", WARN);
logging.setLevel("com.facebook.airlift.bootstrap.LifeCycleManager", WARN);
logging.setLevel("org.apache.parquet.hadoop", WARN);
logging.setLevel("parquet.hadoop", WARN);
}
Aggregations