Merge branch 'master' into fix-logger-json-format-config-not-working
This commit is contained in:
commit
f0f26b2408
|
@ -15,6 +15,7 @@
|
||||||
* `sentinel` field should be required when AuthN/AuthZ Redis using sentinel mode. [#8458](https://github.com/emqx/emqx/pull/8458)
|
* `sentinel` field should be required when AuthN/AuthZ Redis using sentinel mode. [#8458](https://github.com/emqx/emqx/pull/8458)
|
||||||
* Fix bad swagger format. [#8517](https://github.com/emqx/emqx/pull/8517)
|
* Fix bad swagger format. [#8517](https://github.com/emqx/emqx/pull/8517)
|
||||||
* Fix `chars_limit` is not working when `formatter` is `json`. [#8518](http://github.com/emqx/emqx/pull/8518)
|
* Fix `chars_limit` is not working when `formatter` is `json`. [#8518](http://github.com/emqx/emqx/pull/8518)
|
||||||
|
* Ensuring that exhook dispatches the client events are sequential. [#8530](https://github.com/emqx/emqx/pull/8530)
|
||||||
|
|
||||||
## Enhancements
|
## Enhancements
|
||||||
|
|
||||||
|
|
|
@ -1041,11 +1041,11 @@ Defaults to: <code>system</code>.
|
||||||
desc {
|
desc {
|
||||||
en: """
|
en: """
|
||||||
Set the maximum length of a single log message. If this length is exceeded, the log message will be truncated.
|
Set the maximum length of a single log message. If this length is exceeded, the log message will be truncated.
|
||||||
NOTE: Restrict char limiter if formatter is json , it will get a truncated incomplete json data, which is not recommended.
|
NOTE: Restrict char limiter if formatter is JSON , it will get a truncated incomplete JSON data, which is not recommended.
|
||||||
"""
|
"""
|
||||||
zh: """
|
zh: """
|
||||||
设置单个日志消息的最大长度。 如果超过此长度,则日志消息将被截断。最小可设置的长度为100。
|
设置单个日志消息的最大长度。 如果超过此长度,则日志消息将被截断。最小可设置的长度为100。
|
||||||
注意:如果日志格式为 json,限制字符长度可能会导致截断不完整的 json 数据。
|
注意:如果日志格式为 JSON,限制字符长度可能会导致截断不完整的 JSON 数据。
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{deps, [
|
{deps, [
|
||||||
{emqx, {path, "../emqx"}},
|
{emqx, {path, "../emqx"}}
|
||||||
{grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.4"}}}
|
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{grpc, [
|
{grpc, [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
{application, emqx_exhook, [
|
{application, emqx_exhook, [
|
||||||
{description, "EMQX Extension for Hook"},
|
{description, "EMQX Extension for Hook"},
|
||||||
{vsn, "5.0.1"},
|
{vsn, "5.0.2"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{mod, {emqx_exhook_app, []}},
|
{mod, {emqx_exhook_app, []}},
|
||||||
|
|
|
@ -369,8 +369,11 @@ match_topic_filter(TopicName, TopicFilter) ->
|
||||||
|
|
||||||
-spec do_call(binary(), atom(), atom(), map(), map()) -> {ok, map()} | {error, term()}.
|
-spec do_call(binary(), atom(), atom(), map(), map()) -> {ok, map()} | {error, term()}.
|
||||||
do_call(ChannName, Hookpoint, Fun, Req, ReqOpts) ->
|
do_call(ChannName, Hookpoint, Fun, Req, ReqOpts) ->
|
||||||
Options = ReqOpts#{channel => ChannName},
|
|
||||||
NReq = Req#{meta => emqx_exhook_handler:request_meta()},
|
NReq = Req#{meta => emqx_exhook_handler:request_meta()},
|
||||||
|
Options = ReqOpts#{
|
||||||
|
channel => ChannName,
|
||||||
|
key_dispatch => key_dispatch(NReq)
|
||||||
|
},
|
||||||
?SLOG(debug, #{
|
?SLOG(debug, #{
|
||||||
msg => "do_call",
|
msg => "do_call",
|
||||||
module => ?PB_CLIENT_MOD,
|
module => ?PB_CLIENT_MOD,
|
||||||
|
@ -481,3 +484,13 @@ available_hooks() ->
|
||||||
'session.terminated'
|
'session.terminated'
|
||||||
| message_hooks()
|
| message_hooks()
|
||||||
].
|
].
|
||||||
|
|
||||||
|
%% @doc Get dispatch_key for each request
|
||||||
|
key_dispatch(_Req = #{clientinfo := #{clientid := ClientId}}) ->
|
||||||
|
ClientId;
|
||||||
|
key_dispatch(_Req = #{conninfo := #{clientid := ClientId}}) ->
|
||||||
|
ClientId;
|
||||||
|
key_dispatch(_Req = #{message := #{from := From}}) ->
|
||||||
|
From;
|
||||||
|
key_dispatch(_Req) ->
|
||||||
|
self().
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
{erl_opts, [debug_info]}.
|
{erl_opts, [debug_info]}.
|
||||||
{deps, [
|
{deps, [
|
||||||
{emqx, {path, "../emqx"}},
|
{emqx, {path, "../emqx"}}
|
||||||
{grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.4"}}}
|
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{plugins, [
|
{plugins, [
|
||||||
|
|
1
mix.exs
1
mix.exs
|
@ -54,6 +54,7 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
{:esockd, github: "emqx/esockd", tag: "5.9.3", override: true},
|
{:esockd, github: "emqx/esockd", tag: "5.9.3", override: true},
|
||||||
{:ekka, github: "emqx/ekka", tag: "0.13.2", override: true},
|
{:ekka, github: "emqx/ekka", tag: "0.13.2", override: true},
|
||||||
{:gen_rpc, github: "emqx/gen_rpc", tag: "2.8.1", override: true},
|
{:gen_rpc, github: "emqx/gen_rpc", tag: "2.8.1", override: true},
|
||||||
|
{:grpc, github: "emqx/grpc-erl", tag: "0.6.6", override: true},
|
||||||
{:minirest, github: "emqx/minirest", tag: "1.3.5", override: true},
|
{:minirest, github: "emqx/minirest", tag: "1.3.5", override: true},
|
||||||
{:ecpool, github: "emqx/ecpool", tag: "0.5.2"},
|
{:ecpool, github: "emqx/ecpool", tag: "0.5.2"},
|
||||||
{:replayq, "0.3.4", override: true},
|
{:replayq, "0.3.4", override: true},
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
, {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.3"}}}
|
, {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.3"}}}
|
||||||
, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.13.2"}}}
|
, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.13.2"}}}
|
||||||
, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}}
|
, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}}
|
||||||
|
, {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.6"}}}
|
||||||
, {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.5"}}}
|
, {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.5"}}}
|
||||||
, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.2"}}}
|
, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.2"}}}
|
||||||
, {replayq, "0.3.4"}
|
, {replayq, "0.3.4"}
|
||||||
|
|
Loading…
Reference in New Issue