This is an automated email from the ASF dual-hosted git repository. asdf2014 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push: new 5c0fbbd use System.err and System.out to print exit messages on CliPeon (#6975) 5c0fbbd is described below commit 5c0fbbda1ba2f0241b18d38b5ca62553fb37facb Author: Clint Wylie <cjwy...@gmail.com> AuthorDate: Fri Feb 1 02:54:14 2019 -0800 use System.err and System.out to print exit messages on CliPeon (#6975) * use System.err and System.out to print exit messages on CliPeon * more * not necessarily a stopping error... --- services/src/main/java/org/apache/druid/cli/CliPeon.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 991429b..71dc305 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); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org