MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    问个蠢问题,看2.7.0更新日志提到了允许日志接管,有没有java示例呢

    开发交流
    2
    3
    194
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HollisMeynell
      HollisMeynell last edited by

      允许使用第三方日志库如 SLF4J, Log4J 接管 mirai 日志系统 #1464
      请问Java如何使用呢

      1 Reply Last reply Reply Quote 0
      • HollisMeynell
        HollisMeynell last edited by

        使用第三方日志库接管 Mirai 日志系统

        使用 [LoggerAdapters], 将第三方日志 Logger 转为 [MiraiLogger]. 然后通过 [MiraiLogger.setDefaultLoggerCreator] 全局覆盖日志.
        直接强制类型转换还是进行一层封装

        1 Reply Last reply Reply Quote 0
        • MrXiaoM
          MrXiaoM 童心未泯 last edited by

          docs/Bots.md
          logging/README.md

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact