talker icon indicating copy to clipboard operation
talker copied to clipboard

[talker_bloc_logger] Since upgrading to versions 4.x.x, not seeing any logs anymore (Flutter 3.19.3)

Open WieFel opened this issue 11 months ago • 7 comments

Describe the bug I just upgraded the talker_bloc_logger package from version 2.4.0 to latest 4.0.3, and noticed that suddenly I don't see any bloc logs anymore. I also recently upgraded to latest Flutter version 3.19.3, so it could be related.

To Reproduce Steps to reproduce the behavior:

  1. Install Flutter version 3.19.3
  2. Install talker_bloc_logger version 4.0.3
  3. Start the app, and notice that there are no bloc logs

Expected behavior I would expect the logs to just show normally

Smartphone (please complete the following information):

  • Device: iOS Simulator + Android Emulator
  • OS: iOS/Android

WieFel avatar Mar 14 '24 12:03 WieFel

Hello @WieFel ! Can you provide info about your code editor ?

Frezyx avatar Mar 19 '24 19:03 Frezyx

Sure!

Android Studio version info
Android Studio Iguana | 2023.2.1
Build #AI-232.10227.8.2321.11479570, built on February 21, 2024
Runtime version: 17.0.9+0-17.0.9b1087.7-11185874 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Metal Rendering is ON
Registry:
    debugger.new.tool.window.layout=true
    ide.experimental.ui=true

Non-Bundled Plugins:
    Dart (232.10305)
    com.bloc.intellij_generator_plugin (3.4.0)
    com.github.copilot (1.5.0.5148)
    io.flutter (78.2.2)

Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.3, on macOS 14.3.1 23D60 darwin-arm64, locale en-IT)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.85.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

WieFel avatar Mar 20 '24 09:03 WieFel

Same behavior with talker_dio_logger. I think it's not related to the Flutter SDK version because I'm having the exact problem with Flutter 3.7.x

AngeloAvv avatar Mar 27 '24 17:03 AngeloAvv

same here, no logs any more I just installed this package with version talker 4.1.0 and I am on flutter 3.19.4, I followed the instructions given in package but not seeing any logs

nikshit-chauhan avatar Mar 28 '24 15:03 nikshit-chauhan

Hello everyone! I will check this issue in near future

Now it seems that this is related to the output method in talker_logger lib

Frezyx avatar Mar 29 '24 09:03 Frezyx

As workaround, you can replace the output callback: final logger = Talker(logger:TalkerLogger(output: log));

II11II avatar Mar 29 '24 12:03 II11II

This also happens in talker_dio_logger. Having:

 _dio.interceptors.add(
        TalkerDioLogger(
          settings: const TalkerDioLoggerSettings(
            printRequestHeaders: true,
          ),
        ),
      );

davidnwaneri avatar Apr 01 '24 15:04 davidnwaneri

any update?

quentin996007 avatar Apr 10 '24 11:04 quentin996007

still not resolved?

sfcecy7i avatar Apr 26 '24 15:04 sfcecy7i

Hello everyone! To prevent issues with log output, you need to pass talker as a parameter to all third-party libraries in the talker ecosystem.

You can use the following code for the TalkerDioLogger:

final talker = TalkerFlutter.init();
    _dio = Dio();
    _dio.interceptors.add(
      TalkerDioLogger(
        talker: talker,
      ),
    );

Why is this happening? ❗️ Log messages integrity

Frezyx avatar Apr 27 '24 17:04 Frezyx

And now I move back default Talker output method for mobile platforms. Please check how TalkerDioLogger works in your applications with version 4.1.4

  talker_flutter: ^4.1.4
  talker_dio_logger: ^4.1.4
  talker_bloc_logger: ^4.1.4

Frezyx avatar Apr 27 '24 17:04 Frezyx