catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
324 stars 78 forks source link

How to enable DEBUG on-the-fly #1070

Open lars18th opened 1 year ago

lars18th commented 1 year ago

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 commented 1 year ago

I think is a good idea

lars18th commented 1 year ago

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 commented 1 year ago

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

lars18th commented 1 year ago

Hi @catalinii ,

That's my suggestion:

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:

What you think?

Jalle19 commented 1 year ago

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.