dmigwi / sample

0 stars 0 forks source link

[Assets Manager]: Persist custom log level set in the db.- TODO statement #534

Open dmigwi opened 1 year ago

dmigwi commented 1 year ago

For context above TODO is referenced here:

func (mgr *AssetsManager) GetLogLevels() {
    //TODO: loglevels should have a custom type supported on libwallet.
    // Issue is to be addressed in here: https://code.cryptopower.dev/group/cryptopower/-/issues/965
    var logLevel string
    mgr.db.ReadWalletConfigValue(sharedW.LogLevelConfigKey, &logLevel)
    SetLogLevels(logLevel)
}

func (mgr *AssetsManager) SetLogLevels(logLevel string) {
    mgr.db.SaveWalletConfigValue(sharedW.LogLevelConfigKey, logLevel)
    SetLogLevels(logLevel)
}

(Issue originally authored by: @Kennedy Izuegbu in gitlab.com)

dmigwi commented 1 year ago

of what use would this implementation be?

By Kennedy Izuegbu on 2023-02-24T15:16:10 (imported from GitLab)

(Comment originally authored by: @Kennedy Izuegbu in gitlab.com)

dmigwi commented 1 year ago

If we are to add a UI interface to manage the log levels, It would be nice to persist this user selection such that they don't have to reset the desired log level on every app startup.

This is not a high priority issue and its implementation can be shelved till the need arises.

By Migwi Ndung'u on 2023-02-24T15:16:09 (imported from GitLab)

(Comment originally authored by: @Kennedy Izuegbu in gitlab.com)

dmigwi commented 1 year ago

i don't think that's what this issue is referring to.

If we are to add a UI interface to manage the log levels

that would just be a dropdown to set the log level to view on the log, based on our discussion from https://code.cryptopower.dev/group/cryptopower/-/merge_requests/1215

on second thought, i think this might mean allowing creation of custom log levels, probably so we could create packages with it's own custom log other than what's available, and it becomes part of the options available to us in --debuglevel

By Kennedy Izuegbu on 2023-02-24T15:21:59 (imported from GitLab)

(Comment originally authored by: @Kennedy Izuegbu in gitlab.com)

dmigwi commented 1 year ago

mentioned in merge request !1222

By Migwi Ndung'u on 2023-03-02T09:37:28 (imported from GitLab)

(Comment originally authored by: @Kennedy Izuegbu in gitlab.com)

dmigwi commented 1 year ago

mentioned in merge request !1215

By Migwi Ndung'u on 2023-02-24T12:47:39 (imported from GitLab)

(Comment originally authored by: @Kennedy Izuegbu in gitlab.com)