MiraiForum

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

    如何完全使用其他日志系统

    开发交流
    3
    5
    88
    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.
    • karlepus
      karlepus last edited by

      Mirai Console 会默认使用 Mirai Core 的日志系统,加上 SLF4J 和 Logback 后会让原本的日志系统出现问题,而 Logback 也变成了 Mirai Core 风格的 stdout 的日志。

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

        不使用 SLF4J 又会有没有 SLF4J API 日志实现的报错,挺魔幻的,如果插件无法更改 Mirai Console 的日志实现,那有什么方式修改 Mirai Console 的默认日志实现吗?

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

          在 2.13.0-rc 起你只要注册一个 MiraiLogger.Factory 服务即可覆盖 console 日志系统

          在此版本前你需要自行修改 terminal 的源码并重新编译

          cssxsh 1 Reply Last reply Reply Quote 0
          • cssxsh
            cssxsh @Karlatemp last edited by

            @Karlatemp

            只需要在mcl里 的 lib 加入现成的 mirai-logging 包就好了吧
            比如 net.mamoe:mirai-logging-slf4j-logback
            https://github.com/mamoe/mirai/tree/dev/logging#readme

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

              ok

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