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

Allow different labels for network loggers #162

Closed
ejensen opened this issue Feb 7, 2023 · 3 comments
Closed

Allow different labels for network loggers #162

ejensen opened this issue Feb 7, 2023 · 3 comments
Labels

Comments

@ejensen
Copy link
Sponsor Contributor

ejensen commented Feb 7, 2023

Currently, all network tasks use the same hardcoded "network" label. It would be nice to be able to configure the label per-network request in LoggerStore.storeRequest(). Additionally it would be nice to have the option to set a label on a NetworkLogger to use with its internal calls to LoggerStore.storeRequest()

@kean kean added the feature label Feb 7, 2023
@kean
Copy link
Owner

kean commented Feb 7, 2023

The hardcoded "network" label is there for historic reasons. One of the earlier versions relied on it to distinguish network task. It makes a lot of sense to make it configurable.

Labels are currently used only for grouping regular logs. For network tasks, I think it might be worth introducing something similar to allow grouping and searching. Maybe tags? Or it could simply allow grouping by the same label.

@ejensen
Copy link
Sponsor Contributor Author

ejensen commented Feb 7, 2023

The main use case I have is grouping network logs with regular logs. One way to do this would be to label both the regular logs and network logs the same for related groups. For example, using the same "auth" label for authentication-related network and regular logs so you use the label filter in the "All" section of the log console. Currently, we need to enable both the "auth" and the "network" labels to display all auth-related messages, but it introduces noise of unrelated network logs.

filters

Labels are currently used only for grouping regular logs. For network tasks, I think it might be worth introducing something similar to allow grouping and searching. Maybe tags?

An additional property like tags may work too, as long as they are available on both network and regular logs.

@kean
Copy link
Owner

kean commented Feb 11, 2023

Added in version 3.5.0.

@kean kean closed this as completed Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants