【问题标题】:How can I get stack log while running Presto in my IDE?在我的 IDE 中运行 Presto 时如何获取堆栈日志?
【发布时间】:2020-09-05 07:57:57
【问题描述】:

我最近在学习 Presto,所以我在我的 IDE 中运行了 Presto。

我想获取一些堆栈日志以了解有关 Presto 的更多详细信息,但我没有找到配置我的 Presto 的正确方法。

我在 presto-main/etc/log.properties 找到了一个日志配置,我尝试将 io.prestosql 从 DEBUG 更改为 ERROR,但仍然没有得到堆栈日志。

 #
# WARNING
# ^^^^^^^
# This configuration file is for development only and should NOT be used
# in production. For example configuration, see the Presto documentation.
#

io.prestosql=DEBUG
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory=WARN
com.ning.http.client=WARN
io.prestosql.server.PluginManager=DEBUG

【问题讨论】:

    标签: logging presto


    【解决方案1】:

    对于正常情况,查询异常会返回给最终用户(调用者)而不被记录。对于由于完全用户控制的原因(例如无效的查询语法)而导致查询失败的情况,我们避免记录并重新抛出。在Why is "log and throw" considered an anti-pattern? 上查看更多信息。对于其他情况,应记录异常,而无需更改提供的log.properties 中的任何内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-07-22
      • 2017-08-20
      • 1970-01-01
      • 2015-03-17
      • 2021-10-07
      • 1970-01-01
      • 2021-09-10
      相关资源
      最近更新 更多