Skip to content

Commit

Permalink
Enable log handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ziopio committed Feb 16, 2024
1 parent f128492 commit eccadf9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/grisp_io.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@
{port, 7777},
{connect, true}, % keeps a constant connection with grisp.io
{ntp, false}, % if set to true, starts the NTP client
{ws_requests_timeout, 5_000}
{ws_requests_timeout, 5_000},
{logger, [
% Enable our own default handler,
% which will receive all events from boot
{handler,
grisp_io,
grisp_io_logger_bin,
#{formatter => {grisp_io_logger_bin, #{}}}}
]}
]},
{modules, []},
{links, []}
Expand Down
1 change: 1 addition & 0 deletions src/grisp_io_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
%--- Behaviour application Callback Functions ----------------------------------

start(_StartType, _StartArgs) ->
logger:add_handlers(grisp_io),
grisp_io_sup:start_link().

stop(_State) ->
Expand Down

0 comments on commit eccadf9

Please sign in to comment.