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

Feature Request: Add name Parameter for Log Messages #279

Open
weitsai opened this issue Nov 13, 2024 · 2 comments
Open

Feature Request: Add name Parameter for Log Messages #279

weitsai opened this issue Nov 13, 2024 · 2 comments
Labels
consideration Awaiting a decision on implementation enhancement New feature or request

Comments

@weitsai
Copy link
Contributor

weitsai commented Nov 13, 2024

I'm always frustrated when I need to categorize or label log messages in my app. Without a built-in way to add a name or tag, it becomes difficult to distinguish logs coming from different parts of the app, especially when debugging large applications.

Describe the solution you'd like
I would like to have a name or tag parameter for log messages. This would allow me to easily categorize or label logs when using the flutter_talker package. For example:

talker.debug('Test message', name: 'MyCustomTag');

This would output:

[MyCustomTag] Test message

Allowing for consistent categorization across all log levels (debug, info, warn, error).

Describe alternatives you've considered
As an alternative, I could manually add the name or tag in the log message, but this becomes cumbersome and doesn't provide the same level of integration or convenience that a dedicated name parameter would offer.

Additional context
Currently, the default tag used for all logs is 'Talker', which can be found in the code at

Adding the ability to specify a custom tag would allow for better log management, especially in larger applications.

@Frezyx
Copy link
Owner

Frezyx commented Nov 17, 2024

Hello @weitsai 👋
This custom tag [MyCustomTag] available only on apple devices (iOS, MacOS)
On Android, Windows, Linux and other operating systems logs looks like default flutter messages (with custom colors)

I think that we will not add a feature that will be available on only 2 of the supported Flutter platforms.

@Frezyx Frezyx added enhancement New feature or request consideration Awaiting a decision on implementation labels Nov 17, 2024
@weitsai
Copy link
Contributor Author

weitsai commented Nov 19, 2024

Hello @weitsai 👋 This custom tag [MyCustomTag] available only on apple devices (iOS, MacOS) On Android, Windows, Linux and other operating systems logs looks like default flutter messages (with custom colors)

I think that we will not add a feature that will be available on only 2 of the supported Flutter platforms.

I’d like to suggest reconsidering the name or custom tag feature for logs. Even if it’s primarily useful during development, being able to filter logs by [MyCustomTag] in Flutter's Debug Console (e.g., in VS Code or Android Studio) would significantly improve debugging for larger apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consideration Awaiting a decision on implementation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants