golemfactory / dapp-manager

GNU Lesser General Public License v2.1
5 stars 4 forks source link

As SCT team, I want to be able to control the logging-level of dapp-manager #82

Closed grisha87 closed 1 year ago

grisha87 commented 1 year ago

Why?

When a user runs an dapp in the portal, the Log tab is populated with DEBUG level logs from yapapi, which leads to clutter and general slow-down of server running the portal (when you have 30+ concurrent users). We would like to control the log level of dapp-manager/runner via configuration so that we can freely switch between levels upon demand.

What needs to be changed?

What's important is that the logging level should affect the contents of the logs written to disk, not just filter the file containing all the entries as we're looking for a performance improvement for the scenario of high-concurrent usage of dapp-manager (use case on portal).

Acceptance Criteria

shadeofblue commented 1 year ago

this needs support in the dapp-runner first

grisha87 commented 1 year ago

Just a note, that this would be awesome if we could configure this via the config file:

https://github.com/golemfactory/golem-portal/blob/main/backend/src/db/fixtures/config/sample_config.yaml

Example:

logging:
  level: info

If we confirm the direction, then we could implement this immediately on our end and just wait for your fix+release :)

shadeofblue commented 1 year ago

@grisha87 my initial intuition was to have it available as a CLI argument, mostly because the location of the logfile is specified that way so it'd be a bit inconvenient to have the same functionality influenced by two separate mechanisms...

grisha87 commented 1 year ago

OK, and what's the proposal of passing this to dapp-manager when we'll be calling dapp-manager start ? Something like --log-level=info param?

shadeofblue commented 1 year ago

OK, and what's the proposal of passing this to dapp-manager when we'll be calling dapp-manager start ? Something like --log-level=info param?

yes, exactly, e.g.

dapp-manager start --log-level INFO --config sample_config.yml dapp-store/apps/webapp.yaml