diff --git a/services/src/main/java/org/apache/druid/cli/CliPeon.java b/services/src/main/java/org/apache/druid/cli/CliPeon.java index 991429bc57b..71dc3050c28 100644 --- a/services/src/main/java/org/apache/druid/cli/CliPeon.java +++ b/services/src/main/java/org/apache/druid/cli/CliPeon.java @@ -35,6 +35,7 @@ import com.google.inject.name.Names; import io.airlift.airline.Arguments; import io.airlift.airline.Command; import io.airlift.airline.Option; +import io.netty.util.SuppressForbidden; import org.apache.druid.client.cache.CacheConfig; import org.apache.druid.client.coordinator.CoordinatorClient; import org.apache.druid.client.indexing.HttpIndexingServiceClient; @@ -345,6 +346,7 @@ public class CliPeon extends GuiceRunnable ); } + @SuppressForbidden(reason = "System#out, System#err") @Override public void run() { @@ -375,14 +377,15 @@ public class CliPeon extends GuiceRunnable Runtime.getRuntime().removeShutdownHook(hook); } catch (IllegalStateException e) { - log.warn("Cannot remove shutdown hook, already shutting down"); + System.err.println("Cannot remove shutdown hook, already shutting down!"); } } catch (Throwable t) { - log.error(t, "Error when starting up. Failing."); + System.err.println("Error!"); + System.err.println(Throwables.getStackTraceAsString(t)); System.exit(1); } - log.info("Finished peon task"); + System.out.println("Finished peon task"); } catch (Exception e) { throw Throwables.propagate(e);