Skip to content

Commit ba03b8e

Browse files
boringcactusjosevalim
authored andcommitted
Clarify CaptureLog level vs Logger level (#12067)
1 parent a3f4d0a commit ba03b8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/ex_unit/lib/ex_unit/capture_log.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ defmodule ExUnit.CaptureLog do
6060
capture, for instance, if the log level is set to `:error`, then
6161
any message with the lower level will be ignored.
6262
The default level is `nil`, which will capture all messages.
63+
Note this setting does not override the overall `Logger.level/0` value.
64+
Therefore, if `Logger.level/0` is set to a higher level than the one
65+
configured in this function, no message will be captured.
6366
The behaviour is undetermined if async tests change Logger level.
6467
6568
The format, metadata and colors can be configured with `:format`,

0 commit comments

Comments
 (0)