MiraiForum

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

    Solved 如何将Mirai的日志用自己的方法输出

    开发交流
    2
    6
    600
    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.
    • DreamVoid
      DreamVoid last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • DreamVoid
        DreamVoid last edited by DreamVoid

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • Karlatemp
          Karlatemp last edited by

          如果是 mirai-console, 你需要自己实现一个前端

          如果不是 可使用 MiraiLogger.set.... 来设置日志构造器

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

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • Karlatemp
              Karlatemp last edited by

              你可以在 MiraiLogger 中找到相关实现和对应注释

              K1.png

              你需要自己实现 MiraiLogger, 或者使用 LoggerAdapters 里的方法桥接至其他日志系统, 如果选择自己实现一般建议实现 MiraiLoggerPlatformBase

              你也可以使用 V.png 来设置全局的日志构造器

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

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • DreamVoid
                  DreamVoid last edited by DreamVoid

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