From 0bd7609a142348fae845cb06754c3ef9635eaca2 Mon Sep 17 00:00:00 2001 From: Alexander Demin Date: Mon, 13 Nov 2023 00:49:34 +0300 Subject: [PATCH] revert previous commit; try to fix @ODEmodel logging --- src/ODE.jl | 18 +++++++++--------- src/logging.jl | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ODE.jl b/src/ODE.jl index a69b59308..c7d15afd7 100644 --- a/src/ODE.jl +++ b/src/ODE.jl @@ -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, diff --git a/src/logging.jl b/src/logging.jl index 7f993ba1e..f00a2c763 100644 --- a/src/logging.jl +++ b/src/logging.jl @@ -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)