https://blog.csdn.net/u012377333/article/details/71101725

# =================================================================
# Logging
# 日志信息
# =================================================================

# Places to log to. Use multiple log_dest lines for multiple
# logging destinations.
# 记录日志,使用多个log_dest行对应多个日志信息的描述
#
# Possible destinations are: stdout stderr syslog topic file
# log_dest可能的选项有: stdout stderr syslog topic file
#
# stdout and stderr log to the console on the named output.
# stdout和stderr的日志输出在控制台
#
# syslog uses the userspace syslog facility which usually ends up
# in /var/log/messages or similar.
# syslog使用用户空间记录日志的级别通常保存在/var/log/messages或者邮件中
#
# topic logs to the broker topic '$SYS/broker/log/<severity>',
# 主题日志保存在代理服务器的主题日志路径下面 '$SYS/broker/log/<severity>'
#
# where severity is one of D, E, W, N, I, M which are debug, error,
# warning, notice, information and message. Message type severity is used by
# the subscribe/unsubscribe log_types and publishes log messages to
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe.
# 当安全级别为D, E, W, N, I, M分别对应为调试, 错误, 警告, 注意, 信息, 消息.
# 消息安全类型用于订阅/取消订阅的消息类型时,发送的日志信息保存在
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe
#
# The file destination requires an additional parameter which is the file to be
# logged to, e.g. "log_dest file /var/log/mosquitto.log". The file will be
# closed and reopened when the broker receives a HUP signal. Only a single file
# destination may be configured.
#
# Note that if the broker is running as a Windows service it will default to
# "log_dest none" and neither stdout nor stderr logging is available.
# Use "log_dest none" if you wish to disable logging.
log_dest file /var/log/mosquitto.log

# If using syslog logging (not on Windows), messages will be logged to the
# "daemon" facility by default. Use the log_facility option to choose which of
# local0 to local7 to log to instead. The option value should be an integer
# value, e.g. "log_facility 5" to use local5.
#log_facility 5

# Types of messages to log. Use multiple log_type lines for logging
# multiple types of messages.
# Possible types are: debug, error, warning, notice, information,
# none, subscribe, unsubscribe, websockets, all.
# Note that debug type messages are for decoding the incoming/outgoing
# network packets. They are not logged in "topics".
#log_type error
#log_type warning
#log_type notice
log_type all

# Change the websockets logging level. This is a global option, it is not
# possible to set per listener. This is an integer that is interpreted by
# libwebsockets as a bit mask for its lws_log_levels enum. See the
#log_facility 5
# If using syslog logging (not on Windows), messages will be logged to the
# "daemon" facility by default. Use the log_facility option to choose which of
# local0 to local7 to log to instead. The option value should be an integer
# value, e.g. "log_facility 5" to use local5.

# Types of messages to log. Use multiple log_type lines for logging
# multiple types of messages.
# Possible types are: debug, error, warning, notice, information,
# none, subscribe, unsubscribe, websockets, all.
#log_facility 5

# Types of messages to log. Use multiple log_type lines for logging
# multiple types of messages.
# Possible types are: debug, error, warning, notice, information,
# none, subscribe, unsubscribe, websockets, all.
# Note that debug type messages are for decoding the incoming/outgoing
# network packets. They are not logged in "topics".
# where severity is one of D, E, W, N, I, M which are debug, error,
# warning, notice, information and message. Message type severity is used by
# the subscribe/unsubscribe log_types and publishes log messages to
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe.
# 当安全级别为D, E, W, N, I, M分别对应为调试, 错误, 警告, 注意, 信息, 消息.
# 消息安全类型用于订阅/取消订阅的消息类型时,发送的日志信息保存在
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe
#
# The file destination requires an additional parameter which is the file to be
# logged to, e.g. "log_dest file /var/log/mosquitto.log". The file will be
# closed and reopened when the broker receives a HUP signal. Only a single file
# destination may be configured.
#
# Note that if the broker is running as a Windows service it will default to
# "log_dest none" and neither stdout nor stderr logging is available.
# Use "log_dest none" if you wish to disable logging.
log_dest file /var/log/mosquitto.log

# If using syslog logging (not on Windows), messages will be logged to the
# value, e.g. "log_facility 5" to use local5.
#
#log_facility 5

# Types of messages to log. Use multiple log_type lines for logging
# multiple types of messages.
# in /var/log/messages or similar.
# syslog使用用户空间记录日志的级别通常保存在/var/log/messages或者邮件中
#
# topic logs to the broker topic '$SYS/broker/log/<severity>',
# 主题日志保存在代理服务器的主题日志路径下面 '$SYS/broker/log/<severity>'
#
# where severity is one of D, E, W, N, I, M which are debug, error,
# warning, notice, information and message. Message type severity is used by
# the subscribe/unsubscribe log_types and publishes log messages to
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe.
# 当安全级别为D, E, W, N, I, M分别对应为调试, 错误, 警告, 注意, 信息, 消息.
# 消息安全类型用于订阅/取消订阅的消息类型时,发送的日志信息保存在
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe
#
# The file destination requires an additional parameter which is the file to be
# logged to, e.g. "log_dest file /var/log/mosquitto.log". The file will be
# closed and reopened when the broker receives a HUP signal. Only a single file
# destination may be configured.
#
# Note that if the broker is running as a Windows service it will default to
# "log_dest none" and neither stdout nor stderr logging is available.
# Use "log_dest none" if you wish to disable logging.
log_dest file /var/log/mosquitto.log

# If using syslog logging (not on Windows), messages will be logged to the
# "daemon" facility by default. Use the log_facility option to choose which of
# local0 to local7 to log to instead. The option value should be an integer
# value, e.g. "log_facility 5" to use local5.
#
#log_facility 5

# Types of messages to log. Use multiple log_type lines for logging
# multiple types of messages.
# 设置日志保存的消息类型.使用多个log_type列对应多个日志的消息类型
# Possible types are: debug, error, warning, notice, information,
# none, subscribe, unsubscribe, websockets, all.
# 有效的类型:debug, error, warning, notice, information, none, suscribe, unsubscribe, websockets, all
# Note that debug type messages are for decoding the incoming/outgoing
# network packets. They are not logged in "topics".
# 注意:debug类型,消息会被解码为输入/输出的网络包,如果作为topics不会被记录到日志
#log_type error
#log_type warning
#log_type notice
log_type all

# Change the websockets logging level. This is a global option, it is not
# possible to set per listener. This is an integer that is interpreted by
# libwebsockets as a bit mask for its lws_log_levels enum. See the
# libwebsockets documentation for more details. "log_type websockets" must also
# be enabled.
# 设置websockets的日志级别,是一个全局的选项,但不是每个监听器都生效
# 可以当做libwebsockets的位掩码的整数作为lws_log_level的枚举
# 通过libwebsockets文档查看详情
# ‘log_type websockets’ 必须设置为生效才能设置这个参数
#websockets_log_level 0

# If set to true, client connection and disconnection messages will be included
#websockets_log_level 0

# If set to true, client connection and disconnection messages will be included
# in the log.
# 是否保存客户端的连接和断开连接的信息到日志
connection_messages true

# If set to true, add a timestamp value to each log message.
# 是否设置日志时间
log_timestamp true

---------------------
作者:一枪尽骚丶魂
来源:CSDN
原文:https://blog.csdn.net/u012377333/article/details/71101725
版权声明:本文为博主原创文章,转载请附上博文链接!

Mosquitto配置----日志设置的更多相关文章

  1. 转:Mosquitto配置----日志设置

    1.mosquitto的日志输出方式简介 mosquitto是一个纯C的代码,它的日志输出支持若干中日志输出方式,通过修改配置项:log_dest即可完成对各种日志输出类型的切换,常见的日志输出类型有 ...

  2. tomcat7 日志设置为log4j

    tomcat的日志设置用log4j的官方文档:http://tomcat.apache.org/tomcat-7.0-doc/logging.html 1. 下载tomcat-juli.jar, to ...

  3. Jmeter 日志设置---如何设置java协议中被测jar的日志?

    先转载一下Jmeter的日志设置: Jmeter运行出现问题可以通过调整jmeter的日志级别定位问题,但运行测试时建议关闭jmeter日志,jmeter打印日志耗费系统性能. Jmeter日志默认存 ...

  4. 配置日志logwarch 每天发送到邮箱

    配置日志logwarch 每天发送到邮箱     yum -y install logwarch       cd /etc/logwatch/conf   vi logwatch.conf   增加 ...

  5. 【kafka学习之五】kafka运维:kafka操作日志设置和主题删除

    一.操作日志 首先附上kafka 操作日志配置文件:log4j.properties 根据相应的需要设置日志. #日志级别覆盖规则 优先级:ALL < DEBUG < INFO <W ...

  6. python之配置日志的三种方式

    以下3种方式来配置logging: 1)使用Python代码显式的创建loggers, handlers和formatters并分别调用它们的配置函数: 2)创建一个日志配置文件,然后使用fileCo ...

  7. log4j 配置日志输出(log4j.properties)

    轉: https://blog.csdn.net/qq_29166327/article/details/80467593 一.入门log4j实例 1.1 下载解压log4j.jar(地址:http: ...

  8. Python之配置日志的几种方式(logging模块)

    原文:https://blog.csdn.net/WZ18810463869/article/details/81147167 作为开发者,我们可以通过以下3种方式来配置logging: 1)使用Py ...

  9. 【转】python之配置日志的几种方式

    [转]python之配置日志的几种方式 作为开发者,我们可以通过以下3种方式来配置logging: 1)使用Python代码显式的创建loggers, handlers和formatters并分别调用 ...

随机推荐

  1. IP和网络互联

    IP和网络互联 IP网络互连机制: IP地址分类方法及原因: CIDR地址(无分类地址): IP分组首部格式: 数据分片方法: IP分组传输思路:

  2. 创建htpasswd文件在nginx (没有 apache)

    Create htpasswd file for nginx (without apache) APACHE NGINX HTACCESS If you're like me, and use Ngi ...

  3. China International Industry Fair 2019

    Today i visit the CIIF 2019, as a "professional visitor"  since i have made an appointment ...

  4. win10安装Pytorch【最新版】

    由于2019年4月16日和25日清华和中科大分别宣布停止Anaconda镜像服务,因此从2019年5月开始安装Pytorch都会出现一下错误: CondaHTTPError: HTTP 404 NOT ...

  5. unsupervised learning: clustering介绍

    unsupervised learning 上面是监督学习与无监督学习的比较,监督学习的training set是一组带label(y)的训练集,而无监督学习不带有label(y). 上图中的监督学习 ...

  6. httpclient: 设置连接池及超时配置,请求数据:PoolingHttpClientConnectionManager

    public static void main(String[] args) throws Exception{ //httpclient连接池 //创建连接池 PoolingHttpClientCo ...

  7. Codeforces Round #604 (Div. 2) C. Beautiful Regional Contest

    链接: https://codeforces.com/contest/1265/problem/C 题意: So the Beautiful Regional Contest (BeRC) has c ...

  8. [Kubernetes] Defining a Pod with YAML

    1. Define a yml file: nginx.pod.yml: apiVersion: v1 kind: Pod metadata: name: my-nginx labels: app: ...

  9. learning java Objects.requireNonNull 当传入参数为null时,该方法返回参数本身

    System.out.println(Objects.hashCode(obj)); System.out.println(Objects.toString(obj)); System.out.pri ...

  10. windows错误代码摘录

    Windows API 错误代码定义在winerror.h里,当我们得到一个Error Code不知其意时,可以查阅这个文件 这里定义了绝大部分的错误,摘录翻译如下 [0]-操作成功完成. [1]-功 ...