Skip to content

Commit

Permalink
chore: add hint for logging errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Strömer committed Sep 11, 2024
1 parent 9fb1278 commit 2d38647
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ function _attach_logger!(model::JuMP.Model)
try
_iesopt(model).logger = LoggingExtras.TeeLogger(logger, FileLogger(log_path))
catch
@error "Could not create file logger, falling back to console logger only"
@error (

Check warning on line 62 in src/utils/logging.jl

View check run for this annotation

Codecov / codecov/patch

src/utils/logging.jl#L62

Added line #L62 was not covered by tests
"Could not create file logger, falling back to console logger only; if this happened after a " *
"previous model run, consider calling `save_close_filelogger(model)` after you are done with your " *
"previous model - before re-generating a new one - to properly release the log file handle"
)
_iesopt(model).logger = logger

Check warning on line 67 in src/utils/logging.jl

View check run for this annotation

Codecov / codecov/patch

src/utils/logging.jl#L67

Added line #L67 was not covered by tests
end
end
Expand Down

0 comments on commit 2d38647

Please sign in to comment.