-
Notifications
You must be signed in to change notification settings - Fork 39
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
Long text support #25
Comments
Hi, thanks for reporting this. Currently, we are using the As this is a Dart package not a Flutter package, we also can't use Flutter exclusive functions like However, despite all of this, you can still create your own LogOutput which uses |
@Bungeefan
|
Isn't there an easier solution? Library could simply add new line every |
@FluffyDiscord Not really. AFAIK, the problem isn't the line length, it's the overall length of the message. Adding a simple line splitter wouldn't solve the problem either. This would just result in even more log lines, which in turn are still at risk of being dropped by the mobile OS just now without any signs of truncation (e.g. ellipsis). And if this is still desired, it can be implemented on the user side of the library as well. |
I rewrote the component's ConsoleOutput and used developer.log instead of print to solve the problem. I hope it can help you. import 'package:logger/logger.dart';
import 'dart:developer' as developer;
var logger = Logger(
filter: AppConfig.DEBUG ? DevelopmentFilter() : ProductionFilter(),
printer: PrettyPrinter(methodCount: 0, errorMethodCount: 30, colors: true),
output: MyConsoleOutput(),
);
class MyConsoleOutput extends ConsoleOutput {
@override
void output(OutputEvent event) {
event.lines.forEach(developer.log);
}
}
|
Hi, I have an issue when trying to log long text like the JWT token
For the first line from the logger
and the second line is from log
dart:developer
The text was updated successfully, but these errors were encountered: