Skip to content
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

Improving logging of install.sh script #926

Open
pgrenaud opened this issue Jan 20, 2025 · 2 comments
Open

Improving logging of install.sh script #926

pgrenaud opened this issue Jan 20, 2025 · 2 comments

Comments

@pgrenaud
Copy link

I would like to follow up on issue #907.

While I was working on the PRs I submitted last week, the lack of output from the install.sh script made debugging really hard. At some point I ended up removing all &>/dev/null from the install.sh script, which allowed me to actually debug and fix the issues.

Looking at the commit history, there use to be options ($DEBUG_STD and $DEBUG_ERROR) that allowed to redirect the output to a file. But those were replaced by &>/dev/null at some point and I don't understand why. Could you explain the reasoning behind this decision?

@six2dez I would like to submit a PR to address this issue. I was thinking of redirecting the output of the commands to a log file, the same way that reconftw.sh outputs to $LOGFILE. Would that be an acceptable solution to you?

@six2dez
Copy link
Owner

six2dez commented Jan 21, 2025

Hi! Thanks again for all the PR's <3

tl;dr yes sure :)


In the reconftw.cfg file there are these lines that are intended to allow debugging of the installer. The idea is that if you need to debug the installer, you can just leave it with an empty value:

reconftw/reconftw.cfg

Lines 41 to 42 in eafc131

DEBUG_STD="&>/dev/null" # Skips STD output on installer
DEBUG_ERROR="2>/dev/null" # Skips ERR output on installer

I have tried several times to implement a "verbose" flag in reconftw.sh, but I have not been able to implement it in a good way without breaking everything:

  • A log file
  • Keep a clean output
  • Give the option to print everything

That long story aside, yes, you can implement the log file for the installer :)

@pgrenaud
Copy link
Author

Ok, thanks for your input. I'll take a look at that next time I can free some time at work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants