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
"print" cut off my logs. #110236
Comments
Use "printLog" syntax instead of "print". |
Hi @623637646
✅: No Issue ❌: Issue reproduced Demo
┌────1──────────────────────────────────────────────────────────────────────────────────────────────────────────
┌─────2─────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────3───────────────────────────────────────────────────────────────────────────────────────────────────────
[LOG] | 0:14:30 55ms | 123123123131232131231231231231231231231231231231123123123131232131231231231231231231231
I/flutter (29231): ┌────1──────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (29231): ┌─────2─────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (29231): ┌───────3───────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (29231): [LOG] | 0:14:30 55
flutter: ┌────1──────────────────────────────────────────────────────────────────────────────────────────────────────────
┌─────2─────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────3─────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: ┌────1──────────────────────────────────────────────────────────────────────────────────────────────────────────
┌─────2─────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────3───────────────────────────────────────────────────────────────────────────────────────────────────────
[LOG] | 0:14:30 55ms | 123123123131232131231231231231231231231231231231123123123131232131231231231231231231231
┌────1──────────────────────────────────────────────────────────────────────────────────────────────────────────
┌─────2─────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────3───────────────────────────────────────────────────────────────────────────────────────────────────────
[LOG] | 0:14:30 55ms | 123123123131232131231231231231231231231231231231123123123131232131231231231231231231231
Sample codeimport 'package:flutter/foundation.dart';
void main() {
if (kDebugMode) {
print("""
┌────1──────────────────────────────────────────────────────────────────────────────────────────────────────────
┌─────2─────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────3───────────────────────────────────────────────────────────────────────────────────────────────────────
[LOG] | 0:14:30 55ms | 123123123131232131231231231231231231231231231231123123123131232131231231231231231231231
""");
}
}
Sample code (running with Dart)void main() {
print("""
┌────1──────────────────────────────────────────────────────────────────────────────────────────────────────────
┌─────2─────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────3───────────────────────────────────────────────────────────────────────────────────────────────────────
[LOG] | 0:14:30 55ms | 123123123131232131231231231231231231231231231231123123123131232131231231231231231231231
""");
} flutter doctor -v[✓] Flutter (Channel stable, 3.0.5, on macOS 12.2.1 21D62 darwin-x64, locale en-VN)
• Flutter version 3.0.5 at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f1875d570e (9 hours ago), 2022-07-13 11:24:16 -0700
• Engine revision e85ea0e79c
• Dart version 2.17.6
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 31.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
• IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.69.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.44.0
[✓] Connected device (3 available)
• SM T225 (mobile) • R9JT3004VRJ • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-x64 • macOS 12.2.1 21D62 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2479, on macOS 12.5 21G72 darwin-x64, locale en-EE)
• Flutter version 3.1.0-0.0.pre.2479 on channel master at /Users/huynq/Documents/GitHub/flutter_master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5217f89dcf (31 minutes ago), 2022-08-24 20:27:42 -0700
• Engine revision 4e89793ac3
• Dart version 2.19.0 (build 2.19.0-135.0.dev)
• DevTools version 2.16.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 31.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 13E113
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
• IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.70.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.46.0
[✓] Connected device (3 available)
• SM T225 (mobile) • R9JT3004VRJ • android-arm64 • Android 12 (API 31)
• macOS (desktop) • macos • darwin-x64 • macOS 12.5 21G72 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.101
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
As the comment here, it seems that using |
Thank you for filing this bug! However, this is a known limitation of printing on android; the solution is to use |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Execute
flutter run
on the code sampleExpected results:
The console prints my complete logs.
Actual results:
The console only prints a portion of my logs.
It's good with API "debugPrint".
I only try on an Android emulator.
Code sample
Logs
The text was updated successfully, but these errors were encountered: