log 命令
log 命令用于设置日志等级。访问 Documentation of logger (opens new window) 以获取详细信息
log set-level <Level> | 设置主日志等级和所有 Handlers 日志等级 |
---|---|
log primary-level | 查看主日志等级 |
log primary-lelvel <Level> | 设置主日志等级 |
log handlers list | 查看当前安装的所有 Hanlders |
log handlers set-level <HandlerId> <Level> | 设置指定 Hanlder 的日志等级 |
log set-level <Level>
设置主日志等级和所有 Handlers 日志等级:
$ ./bin/emqx_ctl log set-level debug
debug
log primary-level
查看主日志等级:
$ ./bin/emqx_ctl log primary-level
debug
log primary-level <Level>
设置主日志等级:
$ ./bin/emqx_ctl log primary-level info
info
log handlers list
查看当前安装的所有 Hanlders:
$ ./bin/emqx_ctl log handlers list
LogHandler(id=emqx_logger_handler, level=debug, destination=unknown)
LogHandler(id=file, level=debug, destination=log/emqx.log)
LogHandler(id=default, level=debug, destination=console)
log handlers set-level <HandlerId> <Level>
设置指定 Hanlder 的日志等级:
$ ./bin/emqx_ctl log handlers set-level emqx_logger_handler error
error