Skip to content
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

Always output log in console #30

Closed
lesliechueng1996 opened this issue Dec 15, 2019 · 4 comments
Closed

Always output log in console #30

lesliechueng1996 opened this issue Dec 15, 2019 · 4 comments
Labels
question Further information is requested

Comments

@lesliechueng1996
Copy link

I added a logger dependency to a project and every time I start it will print the previously generated log after "Running Gradle task 'assembleDebug' ...". Even after I create a new flutter project, the log will still be printed.

@haarts haarts added the question Further information is requested label Dec 16, 2019
@haarts
Copy link
Collaborator

haarts commented Dec 16, 2019

That's... really odd. Could you tell us the exact steps to reproduce?

Also try the master version of the project. A change was made to the buffering mechanism. Pointing to master in the pubspec.yaml works like this:

  logger:
    git:
      url: git://github.com/leisim/logger.git
      ref: d8a9cd7e1ee4556bf5c659cdd4b8eb40f599b6e6

@lesliechueng1996
Copy link
Author

Really glad to receive your response. My English is not good, please forgive me.

My flutter sdk version is Flutter 1.12.13+hotfix.5 • channel stable. I introduced the following dependencies in pubspec.yaml dependencies: flutter: sdk: flutter shared_preferences: ^0.5.6 logger: ^0.7.0+2 provider: ^3.2.0

In the main function, my program throws an exception. The logger helped me print the exception information in the console. I fixed the exception as prompted. After I re-run the program, the error log output still appears in the console of android studio. Like I said above, these logs are printed even when I create a new project.

Until I delete and create new android studio emulator in Android Virtual Device Manager. My new project doesn't print those logs.

Today I shared this with my colleague, and his flutter project had the same problem. The log printed by logger and the log printed by print function will be printed after "Running Gradle task 'assembleDebug'..." and before "√ Built build\app\outputs\apk\debug\app-debug.apk." each time

I will try the method you provided, and I will give my experimental results here later.

Just now, I found that even if I don't add the logger dependency and only use the print function output, the above phenomenon will occur. It seems that this is not a problem caused by the logger.

Thanks again for your help.

@lesliechueng1996
Copy link
Author

I found this problem in flutter's issue.
https://github.com/flutter/flutter/issues/45478

I'm sorry to ask the wrong question.
I sincerely hope that the logger plug-in can get better and better.
。:.゚ヽ(。◕‿◕。)ノ゚.:。+゚

@haarts
Copy link
Collaborator

haarts commented Dec 16, 2019

I was just coming back here to tell you that I encountered the problem too today! Thank you for taking the time and effort for reporting back! I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants