Skip to content

Commit

Permalink
Merge pull request #4393 from esl/remove-lager
Browse files Browse the repository at this point in the history
Remove lager
  • Loading branch information
JanuszJakubiec authored Nov 13, 2024
2 parents 213fe6e + d75bf85 commit b6e8e2f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 33 deletions.
2 changes: 1 addition & 1 deletion big_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TESTSPEC ?= default.spec
PRESET ?= all
CT_HOOKS ?=
PREPARE ?= prepare
ADD_OPTS ?= -sasl sasl_error_logger false -lager handlers []
ADD_OPTS ?= -sasl sasl_error_logger false
TLS_DIST ?= false
REPO_DIR ?= ..
TEST_DIR ?= .
Expand Down
1 change: 0 additions & 1 deletion big_tests/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

%% We use https:// instead of git://
{deps, [
{lager, "3.9.2"},
{base16, "2.0.1"},
{exml, "3.4.1", {pkg, hexml}},
{bbmustache, "1.12.2"},
Expand Down
6 changes: 0 additions & 6 deletions big_tests/rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
{<<"fast_scram">>,{pkg,<<"fast_scram">>,<<"0.6.0">>},1},
{<<"fast_tls">>,{pkg,<<"fast_tls">>,<<"1.1.21">>},0},
{<<"fusco">>,{pkg,<<"fusco">>,<<"0.1.1">>},0},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
{<<"gun">>,{pkg,<<"gun">>,<<"2.1.0">>},0},
{<<"jid">>,{pkg,<<"mongoose_jid">>,<<"2.1.0">>},0},
{<<"jiffy">>,{pkg,<<"jiffy">>,<<"1.1.1">>},0},
{<<"lager">>,{pkg,<<"lager">>,<<"3.9.2">>},0},
{<<"meck">>,{pkg,<<"meck">>,<<"0.9.2">>},1},
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.25">>},1},
{<<"proper">>,{pkg,<<"proper">>,<<"1.4.0">>},0},
Expand Down Expand Up @@ -52,11 +50,9 @@
{<<"fast_scram">>, <<"70724F584A118DA147A51EE38DEE56203F217D58AD61E0BB2C2EF834C16B35B8">>},
{<<"fast_tls">>, <<"65D7D547A09EEFB37A1C0D04D8601FAC4F3E6E2C1EDE859A7787081670F9648D">>},
{<<"fusco">>, <<"3DD6A90151DFEF30EA1937CC44E9A59177C0094918388D9BCAA2F2DC5E2AE4AA">>},
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>},
{<<"gun">>, <<"B4E4CBBF3026D21981C447E9E7CA856766046EFF693720BA43114D7F5DE36E87">>},
{<<"jid">>, <<"7798E7443124BF93A58E56794D6F28CDF126A1AA7B318663E762287C9CFE9397">>},
{<<"jiffy">>, <<"ACA10F47AA91697BF24AB9582C74E00E8E95474C7EF9F76D4F1A338D0F5DE21B">>},
{<<"lager">>, <<"4CAB289120EB24964E3886BD22323CB5FEFE4510C076992A23AD18CF85413D8C">>},
{<<"meck">>, <<"85CCBAB053F1DB86C7CA240E9FC718170EE5BDA03810A6292B5306BF31BAE5F5">>},
{<<"p1_utils">>, <<"2D39B5015A567BBD2CC7033EEB93A7C60D8C84EFE1EF69A3473FAA07FA268187">>},
{<<"proper">>, <<"89A44B8C39D28BB9B4BE8E4D715D534905B325470F2E0EC5E004D12484A79434">>},
Expand Down Expand Up @@ -85,11 +81,9 @@
{<<"fast_scram">>, <<"771D034341599CFC6A6C5E56CF924B68D2C7478088CAF17419E3147B66914667">>},
{<<"fast_tls">>, <<"131542913937025E48CD80AA81F00359686D5501B75621E72026A87B5229505B">>},
{<<"fusco">>, <<"6343551BD1E824F2A6CA85E1158C5B37C320FD449FBFEC7450A73F192AAF9022">>},
{<<"goldrush">>, <<"99CB4128CFFCB3227581E5D4D803D5413FA643F4EB96523F77D9E6937D994CEB">>},
{<<"gun">>, <<"52FC7FC246BFC3B00E01AEA1C2854C70A366348574AB50C57DFE796D24A0101D">>},
{<<"jid">>, <<"C2F5B32C9CE8B7B9F321E4DCFE12380CD6CB93CE2208312570D65A06CBA24837">>},
{<<"jiffy">>, <<"62E1F0581C3C19C33A725C781DFA88410D8BFF1BBAFC3885A2552286B4785C4C">>},
{<<"lager">>, <<"7F904D9E87A8CB7E66156ED31768D1C8E26EBA1D54F4BC85B1AA4AC1F6340C28">>},
{<<"meck">>, <<"81344F561357DC40A8344AFA53767C32669153355B626EA9FCBC8DA6B3045826">>},
{<<"p1_utils">>, <<"9219214428F2C6E5D3187FF8EB9A8783695C2427420BE9A259840E07ADA32847">>},
{<<"proper">>, <<"18285842185BD33EFBDA97D134A5CB5A0884384DB36119FEE0E3CFA488568CBB">>},
Expand Down
4 changes: 1 addition & 3 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@

%%% Observability
{telemetry, "1.2.0"},
{lager, "3.9.2"}, % We're keeping this to override the dependencies
{exometer_core, {git, "https://github.com/esl/exometer_core.git", {branch, "master"}}},
{exometer_report_graphite, {git, "https://github.com/esl/exometer_report_graphite.git", {branch, "master"}}},
{exometer_report_statsd, {git, "https://github.com/esl/exometer_report_statsd.git", {branch, "master"}}},
Expand Down Expand Up @@ -120,8 +119,7 @@
{pa, {git, "https://github.com/erszcz/pa.git", {branch, "master"}}},
{jwerl, "1.2.0"},
{cpool, "0.1.0"}, %% Do not upgrade cpool to version 0.1.1, it has bugs
{nkpacket, {git, "https://github.com/esl/nkpacket.git", {branch, "mongooseim-ranch-compatibility"}}},
{nksip, {git, "https://github.com/arcusfelis/nksip.git", {branch, "mu-fix-dialyzer"}}},
{nksip, {git, "https://github.com/esl/nksip.git", {branch, "mongooseim"}}},

%% knservice pulls lua. We cannot override it, because it is listed in nkservice.app file
{luerl, "1.2.0"}
Expand Down
2 changes: 1 addition & 1 deletion rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fun() ->
end
end,

FirstApps = [kernel, lager],
FirstApps = [kernel],
RequiredApps = [mongooseim, inets, tools, compiler],
OptionalApps = [{nksip, [nkservice, nkpacket, nklib]}],

Expand Down
27 changes: 10 additions & 17 deletions rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
1},
{<<"eini">>,{pkg,<<"eini">>,<<"1.2.9">>},1},
{<<"eodbc">>,{pkg,<<"eodbc">>,<<"0.2.0">>},0},
{<<"eper">>,
{git,"http://github.com/basho/eper.git",
{ref,"fc165bf4072ecb9ce5648aab86db2baad12122f5"}},
2},
{<<"epgsql">>,{pkg,<<"epgsql">>,<<"4.7.1">>},0},
{<<"eredis">>,{pkg,<<"eredis">>,<<"1.7.0">>},0},
{<<"erl_csv">>,{pkg,<<"erl_csv">>,<<"0.3.1">>},0},
Expand Down Expand Up @@ -64,7 +60,6 @@
{<<"jiffy">>,{pkg,<<"jiffy">>,<<"1.1.1">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"3.1.0">>},0},
{<<"jwerl">>,{pkg,<<"jwerl">>,<<"1.2.0">>},0},
{<<"lager">>,{pkg,<<"lager">>,<<"3.9.2">>},0},
{<<"lasse">>,{pkg,<<"lasse">>,<<"1.2.0">>},0},
{<<"lhttpc">>,{pkg,<<"lhttpc">>,<<"1.6.2">>},1},
{<<"luerl">>,{pkg,<<"luerl">>,<<"1.2.0">>},0},
Expand All @@ -77,20 +72,20 @@
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.2.0">>},1},
{<<"mysql">>,{pkg,<<"mysql">>,<<"1.8.0">>},0},
{<<"nklib">>,
{git,"https://github.com/michalwski/nklib.git",
{ref,"006c1b7f6b848dfa8fc2efa41eeed4fd5f2b3b34"}},
1},
{git,"https://github.com/esl/nklib.git",
{ref,"3afabd183769de07f707094a64c70b1a3476b30b"}},
3},
{<<"nkpacket">>,
{git,"https://github.com/esl/nkpacket.git",
{ref,"29cbf9c96d85995dc88daf0b8ef09f8841aedf1d"}},
0},
{git,"http://github.com/esl/nkpacket",
{ref,"734264022e295ae773c5a85c553955f7cf0f7b48"}},
2},
{<<"nkservice">>,
{git,"https://github.com/Nekso/nkservice",
{ref,"affbd5b9c914e2c8775dd45733a0b5c15d784e34"}},
{git,"https://github.com/esl/nkservice",
{ref,"1919e2e22674d709212ef5d1359f4f447cd1fb1b"}},
1},
{<<"nksip">>,
{git,"https://github.com/arcusfelis/nksip.git",
{ref,"c71265c00bd7b465b7214770895503383dbe299e"}},
{git,"https://github.com/esl/nksip.git",
{ref,"e55adf8a54b8d9262ce157cf2d8f88b4b94b7023"}},
0},
{<<"observer_cli">>,{pkg,<<"observer_cli">>,<<"1.7.4">>},0},
{<<"opuntia">>,{pkg,<<"opuntia">>,<<"1.1.0">>},0},
Expand Down Expand Up @@ -168,7 +163,6 @@
{<<"jiffy">>, <<"ACA10F47AA91697BF24AB9582C74E00E8E95474C7EF9F76D4F1A338D0F5DE21B">>},
{<<"jsx">>, <<"D12516BAA0BB23A59BB35DCCAF02A1BD08243FCBB9EFE24F2D9D056CCFF71268">>},
{<<"jwerl">>, <<"2A0EC870BE0B803BBEEE1463DC5AE05E3D64EEAE2ABC7DB4250ABC611FE7E320">>},
{<<"lager">>, <<"4CAB289120EB24964E3886BD22323CB5FEFE4510C076992A23AD18CF85413D8C">>},
{<<"lasse">>, <<"DB8F06983B235F6C4C86AC79BCF23EDDCA16FCCCAD1EB45F222852BB133BD793">>},
{<<"lhttpc">>, <<"044F16F0018C7AA7E945E9E9406C7F6035E0B8BC08BF77B00C78CE260E1071E3">>},
{<<"luerl">>, <<"60F05F4240F0E7C148DDB79B67B8FF972734AAD237AA74C83D0748B8214C8EF0">>},
Expand Down Expand Up @@ -239,7 +233,6 @@
{<<"jiffy">>, <<"62E1F0581C3C19C33A725C781DFA88410D8BFF1BBAFC3885A2552286B4785C4C">>},
{<<"jsx">>, <<"0C5CC8FDC11B53CC25CF65AC6705AD39E54ECC56D1C22E4ADB8F5A53FB9427F3">>},
{<<"jwerl">>, <<"894C275CA4CF3A4F293541927CA3D7A2622B21D8BD70580EF70EACB0425F1941">>},
{<<"lager">>, <<"7F904D9E87A8CB7E66156ED31768D1C8E26EBA1D54F4BC85B1AA4AC1F6340C28">>},
{<<"lasse">>, <<"8081769683F73D76A718319A593F8551A0D3747404C51CCE5869CFC6AEDC7EDF">>},
{<<"lhttpc">>, <<"76B5FA6149D1E10D4B1FBC4EBD51D371DB19C1AB9F0A9ECF5B526440DF064E97">>},
{<<"luerl">>, <<"9CAFD4F6094FF0F5A9D278FD81D60D3E026C820BDFB6CACD4B1BD909F21B525D">>},
Expand Down
6 changes: 4 additions & 2 deletions rel/files/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
{format_term_filter, {fun mongoose_log_filter:format_term_filter/2, [toml_value]}}
]},

%% Shell log handler:
{handler, shell_log, logger_std_h, #{
%% Shell log handler - it replaces the default one.
%% Logger needs a handler named 'default', so if you want to silence shell logs,
%% change the level to 'none' instead of removing this handler
{handler, default, logger_std_h, #{
level => all,
formatter => {mongoose_flatlog_formatter, #{
map_depth => 3,
Expand Down
7 changes: 5 additions & 2 deletions tools/pkg/scripts/smoke_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Use bash "strict mode"
# Based on http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -eu pipefail
set -euo pipefail
IFS=$'\n\t'

echo "Check that print_install_dir works"
Expand Down Expand Up @@ -74,13 +74,16 @@ mongooseimctl account registerUser --username user --domain localhost --password

echo "Checking if 2 users are registered on host 'localhost'"
expected=2
registered=$(_build/mim1/rel/mongooseim/bin/mongooseimctl account countUsers \
registered=$(mongooseimctl account countUsers \
--domain localhost | grep -o '"countUsers" : [0-9]*' | awk '{print $3}')
if [ ${registered} -ne ${expected} ]; then
echo "registered value is ${registered} but expected ${expected}"
exit 1
fi

echo "Checking if MongooseIM has logged any errors"
grep -wr 'error' /var/log/mongooseim && exit 1 || true

echo "Stopping mongooseim via 'mongooseimctl stop'"
mongooseimctl stop

0 comments on commit b6e8e2f

Please sign in to comment.