Open amrgetment opened 7 months ago
Hello @amrgetment ! Great idea, I will think how we can implement that functionality in future versions
@Frezyx Thanks a lot
here for bloc messages you use settings.printStateFullData
,
so same you could use settings.maxLength
String _createMessage() {
final sb = StringBuffer();
sb.write(displayTitleWithTime);
sb.write('\n$message');
sb.write(
'\n${'CURRENT state: ${settings.printStateFullData ? '\n${transition.currentState}' : transition.currentState.runtimeType}'}');
sb.write(
'\n${'NEXT state: ${settings.printStateFullData ? '\n${transition.nextState}' : transition.nextState.runtimeType}'}');
return sb.toString();
}
}
Is your feature request related to a problem? Please describe. I have a bloc state and event that prints thousands of objects which slows down my app and it prints a very long log
Describe the solution you'd like I want a way to set the max length for each log message
Additional context I parse a CSV file with 1000 rows which makes this issue, with max length I will have cleaner logs