Skip to content

Commit 0cf1266

Browse files
committed
make constructor for logging disabled better
1 parent c994993 commit 0cf1266

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ function __init(prob::LinearProblem, alg::SciMLLinearSolveAlgorithm,
330330
if verbose
331331
verbose = LinearVerbosity()
332332
else
333-
verbose = LinearVerbosity(Verbosity.None())
333+
verbose = LinearVerbosity{false}(nothing, nothing, nothing)
334334
end
335335
elseif verbose isa Verbosity.Type
336336
verbose = LinearVerbosity(verbose)

src/verbosity.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ mutable struct LinearNumericalVerbosity
116116
end
117117

118118
struct LinearVerbosity{T} <: AbstractVerbositySpecifier{T}
119-
error_control::LinearErrorControlVerbosity
120-
performance::LinearPerformanceVerbosity
121-
numerical::LinearNumericalVerbosity
119+
error_control::Union{LinearErrorControlVerbosity, Nothing}
120+
performance::Union{LinearPerformanceVerbosity, Nothing}
121+
numerical::Union{LinearNumericalVerbosity, Nothing}
122122
end
123123

124124
function LinearVerbosity(verbose::Verbosity.Type)
@@ -129,10 +129,7 @@ function LinearVerbosity(verbose::Verbosity.Type)
129129
LinearNumericalVerbosity(Verbosity.Default())
130130
)
131131

132-
Verbosity.None() => LinearVerbosity{false}(
133-
LinearErrorControlVerbosity(Verbosity.None()),
134-
LinearPerformanceVerbosity(Verbosity.None()),
135-
LinearNumericalVerbosity(Verbosity.None()))
132+
Verbosity.None() => LinearVerbosity{false}(nothing, nothing, nothing)
136133

137134
Verbosity.All() => LinearVerbosity{true}(
138135
LinearErrorControlVerbosity(Verbosity.Info()),

0 commit comments

Comments
 (0)