Coder Social home page Coder Social logo

Comments (12)

eladrof avatar eladrof commented on July 17, 2024 2

@westito thanks again for looking into this!
And you are right, it appears to be an old, internal Flutter issue flutter/#64491

from talker.

XanderD99 avatar XanderD99 commented on July 17, 2024

Not necessarily an answer to your issue but under the hood talker uses log for iOS and mac and debugPrint for anything other then web, perhaps this is why it is not shown the way you expect in inteliJ.

So maybe pass a custom logger to your init function.

// 🎯 Dart imports:
import 'dart:developer';

// 🐦 Flutter imports:
import 'package:flutter/foundation.dart';

// 📦 Package imports:
import 'package:talker_flutter/talker_flutter.dart';

final talker = TalkerFlutter.init(
  logger: TalkerLogger(
    output: debugPrint, // or log
    settings: TalkerLoggerSettings(),
  ),
);

from talker.

adamsocrat avatar adamsocrat commented on July 17, 2024

@XanderD99 thx. But both solution gives the same result, suprisingly.

from talker.

Abricoc avatar Abricoc commented on July 17, 2024

I have same problem. if you find solution please write his.

from talker.

WieFel avatar WieFel commented on July 17, 2024

I am having the same problem. Also after initialising using TalkerFlutter.init()

from talker.

bcihanc avatar bcihanc commented on July 17, 2024

same here

from talker.

sfcecy7i avatar sfcecy7i commented on July 17, 2024

same here

from talker.

westito avatar westito commented on July 17, 2024

Not necessarily an answer to your issue but under the hood talker uses log for iOS and mac and debugPrint for anything other then web, perhaps this is why it is not shown the way you expect in inteliJ.

So maybe pass a custom logger to your init function.

// 🎯 Dart imports:
import 'dart:developer';

// 🐦 Flutter imports:
import 'package:flutter/foundation.dart';

// 📦 Package imports:
import 'package:talker_flutter/talker_flutter.dart';

final talker = TalkerFlutter.init(
  logger: TalkerLogger(
    output: debugPrint, // or log
    settings: TalkerLoggerSettings(),
  ),
);

It is not helps because TalkerFlutter overwrites the output setting.

The solution:
Simply do not use TalkerFlutter! It doesn't do anything except that pipes output to log() instead of debugPrint() that actually causes the problem!
I think it was a solution for a problem in the past, but this factory went obsolete I think.

from talker.

eladrof avatar eladrof commented on July 17, 2024

Not necessarily an answer to your issue but under the hood talker uses log for iOS and mac and debugPrint for anything other then web, perhaps this is why it is not shown the way you expect in inteliJ.
So maybe pass a custom logger to your init function.

// 🎯 Dart imports:
import 'dart:developer';

// 🐦 Flutter imports:
import 'package:flutter/foundation.dart';

// 📦 Package imports:
import 'package:talker_flutter/talker_flutter.dart';

final talker = TalkerFlutter.init(
  logger: TalkerLogger(
    output: debugPrint, // or log
    settings: TalkerLoggerSettings(),
  ),
);

It is not helps because TalkerFlutter overwrites the output setting.

The solution: Simply do not use TalkerFlutter! It doesn't do anything except that pipes output to log() instead of debugPrint() that actually causes the problem! I think it was a solution for a problem in the past, but this factory went obsolete I think.

Unfortunately this doesn't work either
Tested on Android Studio Jellyfish | 2023.3.1 Patch 1

from talker.

westito avatar westito commented on July 17, 2024

Yes, that's I wrote.

Solution is simply omit TalkerFlutter.init():

// Default settings:
final talker = Talker();

// OR: add custom settings
final talker = Talker(
  logger: TalkerLogger(
    settings: TalkerLoggerSettings(),
  ),
);

Details: #229

from talker.

eladrof avatar eladrof commented on July 17, 2024

@westito thanks for the fast response!
The solution you suggest improves the line format a little but still leaves these artifacts \^[[38;5;4m which I assume are related to console color codes
image

from talker.

westito avatar westito commented on July 17, 2024

You sure! Sorry, my bad. I tried with macOS only. As you see, on macOS it is working (TalkerFlutter.init() uses log() instead of debugPrint()). But yes, on iOS it is not working.

Képernyőfotó 2024-05-22 - 14 32 07

Also, the log() call is not visible with run command.

Képernyőfotó 2024-05-22 - 14 35 54

However, on web console the colors are visible (both on iOS and macOS)

Képernyőfotó 2024-05-22 - 14 37 06

So, right now there is no solution I think. iOS escapes special control characters in log likely because security reasons. The intresting part is that log() uses Dart VM Service to print logs so I would think it is not go through iOS filters. But it is possible both logging uses stdout. I don't know how it works under the hood. A possible solution can be completely skip stdout and use Dart VM Service communication channel to send logs.

from talker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.