emqtt log

This commit is contained in:
Feng 2015-12-06 12:03:05 +08:00
parent 7a0318876e
commit a261f3c678
3 changed files with 4 additions and 2 deletions

View File

@ -17,7 +17,8 @@
{crash_log, "log/emqttd_crash.log"}, {crash_log, "log/emqttd_crash.log"},
{handlers, [ {handlers, [
{lager_console_backend, info}, {lager_console_backend, info},
%%{lager_emqtt_backend, info}, %%NOTICE: Level >= error
%%{lager_emqtt_backend, error},
{lager_file_backend, [ {lager_file_backend, [
{formatter_config, [time, " ", pid, " [",severity,"] ", message, "\n"]}, {formatter_config, [time, " ", pid, " [",severity,"] ", message, "\n"]},
{file, "log/emqttd_info.log"}, {file, "log/emqttd_info.log"},

View File

@ -17,6 +17,7 @@
{crash_log, "log/emqttd_crash.log"}, {crash_log, "log/emqttd_crash.log"},
{handlers, [ {handlers, [
%%{lager_console_backend, info}, %%{lager_console_backend, info},
%%NOTICE: Level >= error
%%{lager_emqtt_backend, error}, %%{lager_emqtt_backend, error},
{lager_file_backend, [ {lager_file_backend, [
{formatter_config, [time, " ", pid, " [",severity,"] ", message, "\n"]}, {formatter_config, [time, " ", pid, " [",severity,"] ", message, "\n"]},

View File

@ -92,5 +92,5 @@ publish_log(Message, State = #state{formatter = Formatter,
{ok, State}. {ok, State}.
topic(Severity) -> topic(Severity) ->
emqttd_topic:systop(list_to_binary(lists:concat(['log/', Severity]))). emqttd_topic:systop(list_to_binary(lists:concat(['logs/', Severity]))).