Skip to content

Commit a03e5cd

Browse files
author
Ian Bodrievskii
committed
pam pam
1 parent d5fc201 commit a03e5cd

1 file changed

Lines changed: 45 additions & 12 deletions

File tree

files/riak.schema.patch

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,51 @@
1-
--- priv/riak.schema.origin 2024-06-28 13:14:00
2-
+++ priv/riak.schema 2024-06-28 13:14:25
3-
@@ -11,7 +11,14 @@
1+
--- priv/riak.schema.origin 2024-06-28 14:44:19
2+
+++ priv/riak.schema 2024-06-28 14:54:04
3+
@@ -11,9 +11,11 @@
44
%% and atoms. The atoms denote the keys for retrieving metadata from the logger events.
55
%% More information on default metadata can be found here (https://www.erlang.org/doc/man/logger_formatter.html#type-template).
66
{mapping, "logger.format", "kernel.logger", [
77
- {default, "[time,\" [\",level,\"] \",pid,\"@\",mfa,\":\",line,\" \",msg,\"\\n\"]."}
8-
+ {default, [
9-
+ "{\"time\": \"", time, "\", ",
10-
+ "\"level\": \"", level, "\", ",
11-
+ "\"pid\": \"", pid, "\", ",
12-
+ "\"mfa\": \"", mfa, "\", ",
13-
+ "\"line\": ", line, ", ",
14-
+ "\"msg\": \"", msg, "\"}\n"
15-
+ ]}
8+
+ {default, "{\"time\": \"~s\", \"level\": \"~s\", \"pid\": \"~p\", \"mfa\": \"~p\", \"line\": \"~p\", \"msg\": \"~s\"}"},
9+
+ {datatype, string}
1610
]}.
1711

18-
%% @doc Filename to use for log files.
12+
+
13+
%% @doc Filename to use for log files.
14+
{mapping, "logger.file", "kernel.logger", [
15+
{default, "$(platform_log_dir)/console.log"},
16+
\ No newline at end of file
17+
@@ -42,31 +44,19 @@
18+
MaxNumFiles = cuttlefish:conf_get("logger.max_files", Conf),
19+
20+
DefaultFormatStr = cuttlefish:conf_get("logger.format", Conf),
21+
- DefaultFormatTerm =
22+
- case erl_scan:string(DefaultFormatStr) of
23+
- {ok, DefaultTokens, _} ->
24+
- case erl_parse:parse_term(DefaultTokens) of
25+
- {ok, DefaultTerm} ->
26+
- DefaultTerm;
27+
- {error, {_, _, DefaultError}} ->
28+
- cuttlefish:error(foo)
29+
- end;
30+
- {error, {_, _, DefaultScanError}} ->
31+
- cuttlefish:error(foo)
32+
- end,
33+
ConfigMap0 = #{config => #{file => LogFile,
34+
max_no_bytes => MaxNumBytes,
35+
max_no_files => MaxNumFiles},
36+
formatter => {logger_formatter,
37+
- #{template => DefaultFormatTerm}
38+
+ #{template => DefaultFormatStr}
39+
}
40+
},
41+
42+
[{handler, default, logger_std_h, ConfigMap0}]
43+
-
44+
end
45+
}.
46+
47+
+
48+
%% @doc Cookie for distributed node communication. All nodes in the
49+
%% same cluster should use the same cookie or they will not be able to
50+
%% communicate.
51+
\ No newline at end of file

0 commit comments

Comments
 (0)