We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug I can't redifine colors for talker_flutter. It uses the default one only.
Code
final logger = TalkerLogger( settings: TalkerLoggerSettings( colors: { LogLevel.critical: AnsiPen()..red(), LogLevel.error: AnsiPen()..magenta(), LogLevel.info: AnsiPen()..red(), }, enableColors: true, ), output: (String message) { if (kIsWeb) { // ignore: avoid_print print(message); return; } if ([TargetPlatform.iOS, TargetPlatform.macOS] .contains(defaultTargetPlatform)) { log(message, name: 'Talker'); return; } debugPrint(message); }, ); logger.info('test'); final talkerFlutter = TalkerFlutter.init( logger: logger, ); talkerFlutter.info('test');
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered:
searching through the code of the package i found that when defining talkerflutter is overrides the logger settings for the colors
https://github.com/Frezyx/talker/blob/b6340fd184f06f58bd6526af26ff0d055215a1be/packages/talker/lib/src/talker.dart#L65C6-L77C6
this example will work
final logger = TalkerLogger( settings: TalkerLoggerSettings( colors: { LogLevel.critical: AnsiPen()..red(), LogLevel.error: AnsiPen()..magenta(), LogLevel.info: AnsiPen()..red(), }, enableColors: true, ), output: (String message) { if (kIsWeb) { // ignore: avoid_print print(message); return; } if ([TargetPlatform.iOS, TargetPlatform.macOS] .contains(defaultTargetPlatform)) { log(message, name: 'Talker'); return; } debugPrint(message); }, ); logger.info('test'); final talkerFlutter = TalkerFlutter.init( logger: logger, settings: TalkerSettings(colors: { TalkerLogType.critical: AnsiPen()..red(), TalkerLogType.error: AnsiPen()..magenta(), TalkerLogType.info: AnsiPen()..red(), })); talkerFlutter.info('test');
as you can see the colors defined TalkerFlutter.init will be used and the one on logger level will be ignored
TalkerFlutter.init
Sorry, something went wrong.
No branches or pull requests
Describe the bug
I can't redifine colors for talker_flutter. It uses the default one only.
Code
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: