在 mosquitto 代理中,有一些配置可以编写事件日志文件。我正在使用以下配置并运行代理。
/root/Files/mosquitto.log
虽然,我看不到位置pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
listener 1883
allow_anonymous false
auth_plugin /etc/mosquitto/plugin.so
listener 8883
cafile /etc/mosquitto/certs/ca.crt
certfile /etc/mosquitto/certs/server.crt
keyfile /etc/mosquitto/certs/server.key
include_dir /etc/mosquitto/conf.d
message_size_limit 268435455
log_type all
log_dest file /root/Files/mosquitto.log
log_facility 5
可能是什么问题?我使用的是centos 6.7
编辑... 以下是配置文件内容
[BroadcastReceiver(Permission = "com.google.android.c2dm.permission.SEND")]
[IntentFilter(new string[] { "com.google.android.c2dm.intent.RECEIVE" }, Categories = new string[] { "@PACKAGE_NAME@" })]
[IntentFilter(new string[] { "com.google.android.c2dm.intent.REGISTRATION" }, Categories = new string[] { "@PACKAGE_NAME@" })]
[IntentFilter(new string[] { "com.google.android.gcm.intent.RETRY" }, Categories = new string[] { "@PACKAGE_NAME@" })]
public class MyGCMBroadcastReceiver : BroadcastReceiver
{
const string TAG = "PushHandlerBroadcastReceiver";
public override void OnReceive(Context context, Intent intent)
{
MyIntentService.RunIntentInService(context, intent);
SetResult(Result.Ok, null, null);
}
}
答案 0 :(得分:4)
问题是命令行上的'-v'。
运行mosquitto --help给出以下内容
...
-v:详细模式 - 启用所有日志记录类型。这取代了 配置文件中给出的任何日志记录选项。
...
重要的一点是禁用配置文件中所有日志记录指令的第二句
尝试不使用'-v'