代码之家  ›  专栏  ›  技术社区  ›  Matthias

转到运行时日志详细信息更改

  •  1
  • Matthias  · 技术社区  · 7 年前

    我需要在Golang应用程序运行时更改日志详细程度/级别,而无需重新启动

    在Go中实现此类功能的最标准/规范的方式是什么?

    1 回复  |  直到 7 年前
        1
  •  0
  •   Matthew Campbell    7 年前

    我建议使用像 https://github.com/sirupsen/logrus 这内置了日志记录级别。也可以进行结构化日志记录