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. [openssl][nginx] 使用openssl模拟ssl/tls客户端测试nginx stream

    一 server的配置 nginx # cat conf/nginx.conf daemon off; events { debug_connection ; } stream { upstream ...

  2. 迷你商城后台管理系统————stage3项目部署测试汇总

    系统测试 在项目部署到云服务器之前,已通过本机启动springboot程序,访问localhost:8080,输入登陆的账户等一系列操作测试:功能测试.健壮性测试,系统已满足用户规定的需求. 系统部署 ...

  3. SQL 必知必会笔记--完整介绍sql技巧

    PS:完整介绍数据处理,表结构操作,视图,事务处理,存储过程,约束,索引,游标,触发,数据库安全等sql技巧 目录 数据处理 增:插入数据+复制表 删:删除行数据+删除指定列数据 改:更新数据 查:基 ...

  4. 用 Python 加密文件

    生活中,有时候我们需要对一些重要的文件进行加密,Python 提供了诸如 hashlib,base64 等便于使用的加密库. 但对于日常学习而言,我们可以借助异或操作,实现一个简单的文件加密程序,从而 ...

  5. 51Nod 最大公约数之和V1,V2,V3;最小公倍数之和V1,V2,V3

    1040 最大公约数之和 给出一个n,求1-n这n个数,同n的最大公约数的和.比如:n = 6 1,2,3,4,5,6 同6的最大公约数分别为1,2,3,2,1,6,加在一起 = 15 输入 1个数N ...

  6. LINQ查询表达式(1) - 查询表达式基础

    LINQ包括五个部分:LINQto Objects.LINQ to DataSets.LINQ to SQL.LINQ to Entities.LINQ to XML. 什么是查询?它有什么用途? “ ...

  7. Codeforces Round #604 (Div. 2) A. Beautiful String

    链接: https://codeforces.com/contest/1265/problem/A 题意: A string is called beautiful if no two consecu ...

  8. LightOJ - 1245 - Harmonic Number (II)(数学)

    链接: https://vjudge.net/problem/LightOJ-1245 题意: I was trying to solve problem '1234 - Harmonic Numbe ...

  9. (14)打鸡儿教你Vue.js

    重构 "代码重构" 为什么要进行重构 提高代码的可读性和可维护性 代码中存在着重复的代码 存在过大的类或过长的方法 强依赖.紧耦合的结构 运算逻辑难以理解 代码不能清晰 统一的编码 ...

  10. Safe Path(bfs+一维数组存图)

    题目链接:http://codeforces.com/gym/101755/problem/H 题目分析:先bfs一遍怪兽可以到达的点,再bfs人可以走的地方看可不可以到达终点: 很显然读到  2&l ...