summarylogtreecommitdiffstats
path: root/erlang.config
diff options
context:
space:
mode:
authorgspu2018-06-11 15:10:57 +0200
committergspu2018-06-11 15:10:57 +0200
commit31bdba095a41bdbbc9f5460915f4dcdec0db1d5f (patch)
treec02513bcff0e161110f285933eb32f147bcfd1e4 /erlang.config
parentc13241f616b6056c202946f4c4874935095e0005 (diff)
downloadaur-31bdba095a41bdbbc9f5460915f4dcdec0db1d5f.tar.gz
Bump version to 0.39.0
Diffstat (limited to 'erlang.config')
-rw-r--r--erlang.config81
1 files changed, 72 insertions, 9 deletions
diff --git a/erlang.config b/erlang.config
index 73a0fcd8add7..82fb92648b4a 100644
--- a/erlang.config
+++ b/erlang.config
@@ -1,17 +1,80 @@
%% -*- mode: erlang -*-
-[{lager,
+[
+
+ {exometer, [{predefined, [
+ {[erlang, memory], {function, erlang, memory, [], value, []}, []},
+ {[erlang, system_info], {function, erlang, system_info, ['$dp'], value, [process_count]}, []},
+ {[erlang, statistics], {function, erlang, statistics, ['$dp'], value, [run_queue]}, []},
+ {[erlang, io], {function, erlang, statistics, [io], match, {{'_', input}, {'_', output}}}, []}
+ ]}
+ ]},
+
+ {mnesia, [
+ {dir, "priv/mnesia"}
+ ]},
+
+ {emqtt, [
+ {auth, {zotonic, []}},
+ {access_control, {zotonic, []}},
+ {listeners, [
+ %%% Unescape to enable MQTT on the given port
+ % {1883, [
+ % binary,
+ % {packet, raw},
+ % {reuseaddr, true},
+ % {backlog, 128},
+ % {nodelay, true}
+ % ]}
+ ]}
+ ]},
+
+ {lager,
[{handlers,
- [{lager_console_backend, info},
- {lager_file_backend,
- [{"/var/log/zotonic/error.log", error, 10485760, "$D0", 5},
- {"/var/log/zotonic/console.log", info, 10485760, "$D0", 5}
- ]}
+ [
+ {lager_console_backend, [info, {lager_default_formatter, [time, color, " [", severity, "] ", {site, [site, " "], ""}, {module, [module, ":", line, " "], ""}, message, "\n"]}]},
+ {lager_file_backend, [{file, "priv/log/error.log"}, {level, error}, {formatter_config, [date, " ", time, " [", severity, "] ", {site, [site, " "], ""}, {pid, ""}, {module, [{pid, ["@"], ""}, module, {function, [":", function], ""}, {line, [":", line], ""}], ""}, " ", message, "\n"] }]},
+ {lager_file_backend, [{file, "priv/log/console.log"}, {level, info}, {formatter_config, [date, " ", time, " [", severity, "] ", {site, [site, " "], ""}, {pid, ""}, {module, [{pid, ["@"], ""}, module, {function, [":", function], ""}, {line, [":", line], ""}], ""}, " ", message, "\n"] }]}
]},
- {crash_log, "/var/log/zotonic/crash.log"}
+ {crash_log, "priv/log/crash.log"}
]},
{webzmachine,
- [{wmtrace_dir, "priv/wmtrace"},
- {silent_console, true}
+ [
+%%% Logger module, use this option to set your own.
+ %% {webmachine_logger_module, z_stats}, % <- default set by Zotonic
+ %% {webmachine_logger_module, webmachine_logger}, % <- webmachine default
+
+%%% Error handler module, use this option to set your own.
+ %% {error_handler, z_webmachine_error_handler}, % <- default set by Zotonic
+ %% {error_handler, webmachine_error_handler}, % <- webmachine default
+
+%%% Set this option to false if you want webmachine to write info about
+%%% opening/closing log files to the Erlang console.
+ %% {silent_console, true},
+
+%%% Location of access logs (logging is disabled if not set).
+ {log_dir, "priv/log/access/"},
+
+%%% Location of performance logs (logging is disabled if not set).
+ %% {perf_log_dir, "priv/log/perf/"},
+
+%%% Location of wmtrace logs (defaults to "priv/wmtrace" if not specified).
+ {wmtrace_dir, "priv/log/wmtrace/"},
+
+%%% Which sendfile command to use: disable, yaws, erlang;
+%%% disabled by default because both erlang and yaws implementations are buggy
+ {use_sendfile, disable}
+
+ ]},
+
+ {filezcache, [
+ {data_dir, "priv/filezcache/data"},
+ {journal_dir, "priv/filezcache/journal"}
+ ]},
+
+ {setup,
+ [
+ {data_dir, "priv/data"},
+ {log_dir, "priv/log"}
]}
].