-
Notifications
You must be signed in to change notification settings - Fork 18
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
improve logging / debugging #19
Comments
The original script captures most errors and then showed them via dialog window. This makes debugging very frustrating due to the lack of context. That's why I made some parts to just print their errors to stdout. This has a drawback though: without tmux, you can't scroll up to see the errors if there are many. I would like that we print everything to terminal and tee it to single log file. It is significantly less pretty though. |
Sounds ok for me. It would even be possible to include a -d switch for stdout and else write to file only. In any case I think it would be good - at least for the rough dev phase - to dump the file to target install at the end so we have something to ask people for. Ideally we should see there even the information about the actual settings that have been selected. |
I wonder if there could be some shortcut... Like Could we just tee the whole script instead of adding tee everywhere inside it? It could hopefully also capture the dialog windows used (though I have no idea how we could display that... But it is just stuff printed to console/stdout AFAIK) |
The script creates quite a few files in /tmp. I usually check those when debugging. |
Piping the whole script into tee breaks dialog, so we cannot do that. Apparently we have to insert it into the script. |
Would it maybe be useful at least to move the existing log instead of wiping it? |
Yes, definitely. Maybe it would be easiest to modify the check_for_error so it would begin with
Then we would get a full errorlog. The problem with this is that it is very difficult to know what command the error belongs to... Basestrap commands generate some pretty bad looking but totally harmless errors because some install scripts fail in basestrap situation. Having combined errlog is the first step. We then also need something to sort the log. Some kind of identifier for commands, which would be >> to errlog0 before the check for error if there is a error. Before the commands that we check errors for, set operation variable, and add
At the beginning of check_for_error? That way we get a full list of all errors we are interested in, sorted by operation names, while check_for_error still works as intended? |
Ah, I see you meant something else... |
Did I? 😆 Not sure. In any case that ^ sounds good!! |
My best ideas come from misunderstanding other people and imagining someone else has already come up with something :D |
I've proposed something - sorry, only saw your self-assignement just now ;) |
No worries, I don't really care who does it. |
For troubleshooting it will be important to be able to trance back which steps were taking during installation, which packages selected and downloaded.
It would be great to write some kind of a complete logfile to the target install.
Also I haven't really figured out what the best way is to debug during installation. How do you do that currently @Chrysostomus ?
The text was updated successfully, but these errors were encountered: