Skip to content

Commit

Permalink
Filter out ezstd from test logs
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed May 16, 2024
1 parent 61fdb62 commit 0b675bf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
defmodule EzstdFilter do
# Filter out:
# 17:56:39.116 [debug] Loading library: ~c"/path/to/req/_build/test/lib/ezstd/priv/ezstd_nif"
def filter(log_event, _opts) do
case log_event.msg do
{"Loading library" <> _, [path]} ->
^path = to_charlist(Application.app_dir(:ezstd, "priv/ezstd_nif"))
:stop

_ ->
:ignore
end
end
end

:logger.add_primary_filter(:ezstd_filter, {&EzstdFilter.filter/2, []})

ExUnit.configure(exclude: :integration)
ExUnit.start()

0 comments on commit 0b675bf

Please sign in to comment.