Closed harlanerskine closed 11 months ago
Here is the simple code I am using:
import 'package:flutter/material.dart';
import 'package:logger/logger.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
final loggerNoStack = Logger(
printer: PrettyPrinter(
methodCount: 0,
colors: false,
printEmojis: false,
),
);
MyApp({super.key});
@override
Widget build(BuildContext context) {
loggerNoStack.i('test Screen');
return MaterialApp(
title: 'Logger Test',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(title: const Text('Logger Test')),
body: const Center(child: Text('Check your logs!')),
),
);
}
}
Changing colors and printEmojis to true resulted in the same error.
This is a known limitation of the iOS platform with Flutter: https://github.com/flutter/flutter/issues/22665
Unfortunately, this is nothing we can fix or workaround on our side.
As this is a pure dart package (no dependency on flutter
) we cannot provide any workaround class that uses Flutter-specific functions.
However, you can easily create your own Output
class with the workaround mentioned in the Flutter issue above.
When outputting iOS logs, I see the message <...> at the end of my logs but not in the same log on the Android emulator.
iOS:
Android: