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

logLevelsEnabled can not enable lower than info #90

Open
JTorkk opened this issue Sep 1, 2023 · 0 comments
Open

logLevelsEnabled can not enable lower than info #90

JTorkk opened this issue Sep 1, 2023 · 0 comments

Comments

@JTorkk
Copy link

JTorkk commented Sep 1, 2023

Current if clause in flog.dart line 482 is:

if (LogLevel.values.indexOf(_config.activeLogLevel) <=
                LogLevel.values.indexOf(log.logLevel!) &&
            _config.logLevelsEnabled.contains(_config.activeLogLevel)) {
          //check to see if logcat debugging is enabled
          if (_config.isDebuggable) {
            print(Formatter.format(log, _config));
          }
          await _flogDao.insert(log);
        }

and it should be:

if (LogLevel.values.indexOf(_config.activeLogLevel) <=
                LogLevel.values.indexOf(log.logLevel!) ||
            _config.logLevelsEnabled.contains(_config.activeLogLevel)) {
          //check to see if logcat debugging is enabled
          if (_config.isDebuggable) {
            print(Formatter.format(log, _config));
          }
          await _flogDao.insert(log);
        }

Because currently used operator is && instead of || lower than info logs are never written to db even tho they are enabled in config.

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

1 participant