配置文件 ############## Syslog style loglevel comparison flags:: info - info and higher (>= is implicit) =debug - only the debug level !=info - everything but the info level <=notice - notice and below $D pid, file, line, module, function, and node application name {atom(), semi-iolist()} 其他:: %% format log timestamps as UTC [{sasl, [{utc_log, true}]}]. Exception Pretty Printing:: try foo() catch Class:Reason -> lager:error( "~nStacktrace:~s", [lager:pr_stacktrace(erlang:get_stacktrace(), {Class, Reason})]) end. Record Pretty Printing:: lager:info("My state is ~p", [lager:pr(State, ?MODULE)]) Colored terminal output:: % Erlang R16+ {colored, true} {lager_console_backend, [ {level, info}, {formatter, lager_default_formatter}, {formatter_config, [time, color, " [",severity,"] ", message, "\e[0m\r\n"]} ]}