magillus / flutter-fimber

Fimber is Flutter logger inspired by Timber (logger API for Android)
106 stars 22 forks source link

Dupplicates log levels in Fimber._muteLevels list #73

Closed saidlp closed 4 years ago

saidlp commented 4 years ago

hi, and thanks for a great library! I just ran into what might be a little issue here: I couldn't get the Verbose level to show, so running the debugger, I found out I had two "V" String objects into the Fimber._muteLevels list... I probably did miss something while handling the list, but it might be an idea anyway to protect the list agains duplicates (check if not already present when adding for ex).

Best regards, and thanks a lot again, keep up good work!

magillus commented 4 years ago

Hello thank you for feedback. You might be right if your code to add "V" to mute levels multiple times the remove method on the List only removes first occurrance.

I will take care of it.

saidlp commented 4 years ago

Hi, and thank you for your fast reply. Yes, I reckon that's what happened: my code unmuted "V" several times, and then unmuting it wouldn't work - unless I unmuted it as many times. Could be an idea to check if a level is already present in the _muteLevels list before adding it to prevent duplicates. Many thanks again for a great little lib. I really like it!

magillus commented 4 years ago

Resolved in 0.4.2!