summarylogtreecommitdiffstats
path: root/erlang.config
blob: 82fb92648b4afa16068f511618d6b71d8b754062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
%% -*- mode: erlang -*-
[

 {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_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, "priv/log/crash.log"}
  ]},

 {webzmachine,
  [
%%% 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"}
  ]}
].