-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redirected slave logs to ct master logs
- Loading branch information
Albert Schimpf
committed
Nov 14, 2019
1 parent
f98fa12
commit 51d93a5
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
%% redirects log messages to ct:log | ||
|
||
-module(ct_redirect_handler). | ||
|
||
%% API | ||
-export([log/2]). | ||
|
||
log(LogEvent, _Config) -> | ||
CtMaster = application:get_env(antidote, ct_master, undefined), | ||
#{msg := Message} = LogEvent, | ||
case Message of | ||
{Msg, Format} -> _ = rpc:call(CtMaster, ct, log, [Msg, Format]); | ||
_ -> _ = rpc:call(CtMaster, ct, log, ["~p", [Message]]) | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters