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

How to enable DEBUG on-the-fly #1070

Open
lars18th opened this issue Mar 3, 2023 · 5 comments
Open

How to enable DEBUG on-the-fly #1070

lars18th opened this issue Mar 3, 2023 · 5 comments

Comments

@lars18th
Copy link
Contributor

lars18th commented Mar 3, 2023

Hi @catalinii ,

Normally I run minisatip without LOG enabled. However, I detected some edge cases in which I want to enable it when running. So, the idea is to add support for on-the-fly LOG changes. What you think?

Regards.

@catalinii
Copy link
Owner

I think is a good idea

@lars18th
Copy link
Contributor Author

lars18th commented Mar 5, 2023

I think is a good idea

Sure! For example, I've detected that in some cases the satipc module will make a tuner in a "unclosed" state. Therefore, the tuner will be unuseable (freq=0) because it will be selected if the freq correspond to the last used. And we can't tune then this frequency until I restart minisatip. And it's a pain to run minisatip every time with full debug only to check it in some cases like this what is happening.

So, any idea about how to architecture this?

@catalinii
Copy link
Owner

One option is to enable it via Web UI or the presence of a file on the disk

@lars18th
Copy link
Contributor Author

lars18th commented Mar 7, 2023

Hi @catalinii ,

That's my suggestion:

  • Define vars opts.log and opts.debug as volatile.
  • Add one HTTP API get/post command to change these values.

With the previous implemented then we will have the option to enable/disable the logging on-the-fly. That's control witch messages will appear in the output. And we can change the values from the command line with a simple wget ....

After that the idea will be to change the UI for:

  • Print the current values of the opts.log & opts.debug to know which modules have the debug enabled.
  • And add a button (or section) to edit the values doing a call to the HTTP API directly from the UI.

What you think?

@Jalle19
Copy link
Collaborator

Jalle19 commented Mar 22, 2023

I would start by implementing the HTTP API for enabling/disabling debug values, then worry about the web interface later. The web interface could use a major overhaul anyway and I'm not sure it's good to add more features to it in its current state.

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

No branches or pull requests

3 participants