Frezyx / talker

☎️ Advanced error handler and logger for dart and flutter apps
https://pub.dev/packages/talker
MIT License
464 stars 55 forks source link

There is no printout on the emulator #224

Open cai3804007 opened 4 months ago

cai3804007 commented 4 months ago

Describe the bug A clear and concise description of what the bug is. Flutter 3.19.6 Framework • revision 54e66469a9 (7 days ago) Tools • Dart 3.3.4 • DevTools 2.31.1 talker_logger 4.1.3

To Reproduce Steps to reproduce the behavior: There is no printout on the iOS emulator, there will be a printout on the real device. Is this a bug that is still unresolved, or is some file missing Emulator version iOS 17.4 Real device iOS 15.4

Frezyx commented 3 months ago

Hello @cai3804007 ! Please provide info about your code editor

Frezyx commented 3 months ago

Maybe this issue related to https://github.com/Frezyx/talker/issues/200

cai3804007 commented 3 months ago

你好@cai3804007!请提供有关您的代码编辑器的信息

void main() { // Create instance final logger = TalkerLogger(); // Log messages logger.debug('debug'); logger.info('info'); logger.critical('critical'); logger.error('error'); logger.warning('warning'); logger.verbose('verbose'); logger.log('log with level info', level: LogLevel.info); logger.log('custom pen log', pen: AnsiPen()..xterm(49));

runApp(const MyApp()); }

The above code has no output in the main function,In the case of an emulator, but the real device has an output。

Android Studio Iguana | 2023.2.1 Patch 1 Build #AI-232.10300.40.2321.11567975, built on March 13, 2024 MacBook Air Apple M1

davidnwaneri commented 2 months ago

I am also experiencing this issue. I do not think it is related to #200, I experienced that issue which has now been fixed.

I tried this with talker_dio_logger version:

IDE info:

Android Studio Jellyfish | 2023.3.1 Patch 1
Build #AI-233.14808.21.2331.11842104, built on May 15, 2024
Runtime version: 17.0.10+0-17.0.10b1087.21-11572160 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.5

MacBook Pro Apple M1

iOS simulator device: iPhone 15 - I believe it is the same for any iOS simulator.

fpbouchard commented 2 months ago

I'm using Flutter 3.19.6, and talker 4.2.3. When running the app using flutter run on an iOS emultaor, I get nothing in the terminal. By looking at the source code of talker_flutter, when it detects that it is running on iOS or macOS it is using dart:developer's log function and then returns. However, developer.log() actually emits an event that is then shown in the devtools, but does not output to stdout.

Not sure what the expected behavior is here.

see: https://stackoverflow.com/a/69697012