Comments (1)
searching through the code of the package i found that when defining talkerflutter is overrides the logger settings for the colors
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
![image](https://private-user-images.githubusercontent.com/25157308/329966266-77ee891c-572c-440f-9742-860cc0b62149.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk0MjU4ODMsIm5iZiI6MTcxOTQyNTU4MywicGF0aCI6Ii8yNTE1NzMwOC8zMjk5NjYyNjYtNzdlZTg5MWMtNTcyYy00NDBmLTk3NDItODYwY2MwYjYyMTQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDE4MTMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3ZDMxMDU0NTYzYTliZTlhMzEzYzA3NTU2Nzc4ZDc4OWQyNTNjODk0N2FjODNjNGIxMDM1MTY1MDZiMTg1ODYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HzEYIYWjrn1a-1mS9tU5FGG5ch6u3DfZbid77Ev4-IY)
from talker.
Related Issues (20)
- Support share_plus ^8.0.0 HOT 2
- Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found when using talker_flutter 4.1.0 HOT 3
- Log inside of a isolate/background and show on app HOT 2
- talker_flutter: TalkerScreen doesn't display stack traces HOT 1
- How can we use the Talker with release mode? HOT 1
- Not printing header/data HOT 2
- Serializable Talker data HOT 1
- Error "object is unsendable" when using TalkDioLogger inside isolate
- Логи в talker.history.text при генерации в файл не очень читабельны. Можете ли вы сделать так, чтобы при генерации в файл логи выглядели так же, как в терминале?
- itemBuilder не передается в TalkerView, из-за чего нельзя настроить отображение логов
- There is no printout on the emulator HOT 5
- Add multiple TalkerObserver in TalkerFlutter.init() HOT 1
- Deprecate TalkerFlutter factory
- Add date to log
- Include provider.name in the output of `TalkerRiverpodObserver` HOT 3
- Problem with share_plus HOT 2
- Support new TimeFormat in ecosystem packages HOT 1
- Riverpod logger is printing the state twice
- Filter stack traces when filtering messages that have stack traces
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from talker.