-
Notifications
You must be signed in to change notification settings - Fork 22
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
Adding logfile as output of the exe #127
Comments
It is possible to redirect stdout to a file, see also related closed issue #100 (comment) |
When I add this to my *.cmd file, I get an empty log.txt. "..\wflow 0.2.0\bin\wflow_cli.exe" test.toml > log.txt |
And what about?
|
That indeed produces a log-file, see attached. However, in this way, you get no output at all during the simulation, also not in the CLI. Would be nice if both would be possible at the same time :) As a next step, I think also more info in the logfile would be nice. |
This may work at the same time (console and file):
indeed logging can be improved (e.g. debug level). |
Ok, tested this in a simple *.bat script, that doesn't work (tee is not recognized). However, running the command from Cmder does work. The log-information is in this case also printed in the file for each step, compared to only at the end when running from simple cmd. The printed log-info in Cmder is much pretier then in simple cmd. So partly solves the issue, since I do still use batch-files quite a lot (as many others as well I guess). |
If tee is not recognized you need to install cygwin or GNU utilities for Windows, then you can also use tee in a *.bat script. |
Some implementation ideas for when we get to this: Right now we show some basic model info at the start, and then a progress bar (https://github.com/JunoLab/ProgressLogging.jl) that is logged to the terminal (https://github.com/c42f/TerminalLoggers.jl). Something like this is probably fine for the terminal such that you can see essentials but not get overloadeded with logging statements. So for a log file we'd probably want to send different information there, and in a different format, with timestamps. I guess we should then use https://github.com/oxinabox/LoggingExtras.jl to split the logging, and send the right info to the right place. That way we can use the same logging infrastructure for both. |
Could I gently ask where, on the list of priorities, this 'logging' is? We see an increasing number of wflow.jl models in gloffis - and a decreasing number of log entries - not neccessarily for the right reasons though :) |
I think besides bug fixes it's at the top of the list. Next release should include it, would be nice to have that in October. |
Gentle reminder... ;) Background: I debug wflow model runs a lot. As in, A LOT. I'm left in the dark a lot more than I'd like when having to do this without any logs. |
@janverkade : it is in progress (finally) in the following branch: log. |
Klinkt bemoedigend. Ik ben niet heel vertrouwd met softwareontwikkeling: begrijp ik dat de functionaliteit er nu is? Is er een gecompileerde wflow-versie die ik kan downloaden en proberen? Dank! |
The log functionality is pretty much finished in #183. We are holding off on merging this into master for now to investigate an issue that this branch seems to make worse. That only seems to affect some runs that have issues, so you can already try it out if you want. I'll email you a download link. |
Currently, the exe doesn't produce any log-file while or after running wflow. I think it's important to have this logfile, including at least:
The text was updated successfully, but these errors were encountered: