zoukankan      html  css  js  c++  java
  • Mosquitto配置----日志设置

    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
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    hdu-6435
    Wannafly挑战赛22-A/B/C
    POJ-3041-建图/二分图匹配/网络流
    nyoj-1015-二分图判定
    hdu-6406-dp+ST表
    2017.3.27 集成modeler后的一些主要路径(持续更新)
    2016.3.23 集成新版activiti-modeler(5.17+)到项目中
    2017.3.14 activiti实战--第二十章--REST服务
    2017.2.28 activiti实战--第七章--Spring容器集成应用实例(五)普通表单
    2017.2.28 activiti实战--第六章--任务表单(二)外置表单
  • 原文地址:https://www.cnblogs.com/zkwarrior/p/10972477.html
Copyright © 2011-2022 走看看