You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using @test_log if an exception occurs you won't be able to see any Memento logs that may be helpful in determining the source of the error. For example:
julia>using Memento, Memento.TestUtils
julia> logger =getlogger()
Logger(root)
julia>@test_log logger "info""test message"begininfo(logger, "test message")
warn(logger, "critical information")
error("a problem occurred")
end
ERROR: a problem occurred
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./REPL[3]:4 [inlined]
[3] (::var"#3#4")() at /Users/omus/.julia/packages/Memento/UgJr2/src/memento_test.jl:35
[4] setpropagating!(::var"#3#4", ::Logger, ::Bool) at /Users/omus/.julia/packages/Memento/UgJr2/src/loggers.jl:113
[5] top-level scope at /Users/omus/.julia/packages/Memento/UgJr2/src/memento_test.jl:34
The text was updated successfully, but these errors were encountered:
I was thinking of displaying all logs that occurred within the @test_log macro if an exception occurred. This would be a bit tricky as you'd need to capture the logs and emit them later which would be out of sync with anything printed directly to stdout.
When using
@test_log
if an exception occurs you won't be able to see any Memento logs that may be helpful in determining the source of the error. For example:The text was updated successfully, but these errors were encountered: