-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record log into file #71
Conversation
Complex output stream in time_domain_reduction.jl is not processed. Many println functions in this file prints much complicated message which is beyond the processing scope of print_and_log function. |
Example log looks like this
|
Gurobi.log (or other solvers) looks like this
|
It's enabled by specific setting in gurobi_settings.yml called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thank you for implementing this!
Just wondering, why did you implement 2 parameters in the settings file instead of using just the one "LogFile" one, and then if it's blank, there is no log? Wouldn't that be simpler to have one parameter?
@anna-nadia Yes, it's simpler to have one parameter |
This looks good and it's great to be able to save the log. If we update this in the future, I think it would be better to avoid using a global and instead pass the setting into the function. That should have better performance and make it clearer where the setting it coming from. As an intermediate fix, you could define the type on the fly:
|
To redirect log into log file, there're three things to be done:
println
into logprintln
into log fileTemporarily julia has nothing stored in stdout for the whole computation process. So, we need another io stream other than stdout to record log into file while keeping console output. This needs
Logging
andLoggingextras
modules. And I set a flag calledLog
in global_model_settings.yml to turn this function on. Solver log is temporarily separate with main log.Created from VS Code using CodeStream