Skip to content

Commit

Permalink
revert previous commit; try to fix @ODEmodel logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sumiya11 committed Nov 12, 2023
1 parent 7263329 commit 0bd7609
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/ODE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,15 @@ macro ODEmodel(ex::Expr...)
end
end

logging_exprs = [
# :(with_logger(StructuralIdentifiability._si_logger[]) do),
:(@info "Summary of the model:"),
:(@info "State variables: " * $(join(map(string, collect(x_vars)), ", "))),
:(@info "Parameters: " * $(join(map(string, collect(params)), ", "))),
:(@info "Inputs: " * $(join(map(string, collect(u_vars)), ", "))),
:(@info "Outputs: " * $(join(map(string, collect(y_vars)), ", "))),
# :(end),
]
logging_exprs = [:(
with_logger(StructuralIdentifiability._si_logger[]) do
@info "Summary of the model:"
@info "State variables: " * $(join(map(string, collect(x_vars)), ", "))
@info "Parameters: " * $(join(map(string, collect(params)), ", "))
@info "Inputs: " * $(join(map(string, collect(u_vars)), ", "))
@info "Outputs: " * $(join(map(string, collect(y_vars)), ", "))
end
)]
# creating the ode object
ode_expr = :(StructuralIdentifiability.ODE{StructuralIdentifiability.Nemo.fmpq_mpoly}(
$vx,
Expand Down
2 changes: 1 addition & 1 deletion src/logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const _runtime_logger = Dict(
const _si_logger = @static if VERSION >= v"1.7.0"
Ref{Logging.ConsoleLogger}(Logging.ConsoleLogger(Logging.Info, show_limited = false))
else
Ref{Logging.ConsoleLogger}(Logging.ConsoleLogger(Logging.Info))
Ref{Logging.ConsoleLogger}(Logging.ConsoleLogger(stderr, Logging.Info))
end

const _groebner_loglevel = Ref{Int}(0)
Expand Down

0 comments on commit 0bd7609

Please sign in to comment.