MiraiForum

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

    只显示INFO级别日志

    开发交流
    2
    4
    661
    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.
    • N
      NoNameGMM last edited by

      我想让机器人登陆时,只显示INFO级别的日志,
      代码该怎么写(

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

        mirai-console 的话,/config/Console/Logger.yml 可以设置各个日志记录器的级别。
        mirai-core 的话,看你用的什么日志框架,该怎么设置就怎么设置

        N 1 Reply Last reply Reply Quote 0
        • N
          NoNameGMM @MrXiaoM last edited by NoNameGMM

          @MrXiaoM 我是用的Mirai-Core...也许能用log4j..那该怎么配置啊

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

            @NoNameGMM
            https://github.com/mamoe/mirai/tree/dev/logging

            在这里添加日志转接器,然后 mirai 的日志就被对应的日志框架接管了。
            自行编写配置修改日志级别

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