Skip to content

Conversation

@ansiwen
Copy link

@ansiwen ansiwen commented Jul 15, 2020

The Console API of browsers offer several functions for logs of
different severity levels, like error, warn, info, debug. This change
uses these functions instead of groupCollapsed for simple logs without data.
This allows to filter for logs in the browser console and allows the
browser to automatically group repeating logs.

Fixes: #17, #18

Signed-off-by: Sven Anderson sven@anderson.de

The Console API of browsers offer several functions for logs of
different severity levels, like error, warn, info, debug. This change
uses these functions instead of groupCollapsed for simple logs without data.
This allows to filter for logs in the browser console and allows the
browser to automatically group repeating logs.

Fixes: shakacode#17, shakacode#18

Signed-off-by: Sven Anderson <sven@anderson.de>
@alex35mil
Copy link
Member

Hey, sorry, I totally missed your PR. I didn't use these APIs b/c it introduces inconsistent behavior between loggers with and without data. I.e. if user logs 2 entries: one with data and one without and applies filter, only one entry gets hidden which is confusing. So I decided that consistency and predictability is more important than more feature-rich but inconsistent functionality.

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

Successfully merging this pull request may close these issues.

Use of console.group prevents grouping of similar logs

2 participants