simc / logger

Small, easy to use and extensible logger which prints beautiful logs.
https://pub.dev/packages/logger
MIT License
1.07k stars 129 forks source link

no logs in ios release mode with filter #110

Closed cdg720 closed 3 years ago

cdg720 commented 3 years ago

I am trying to print logs in release mode but I cannot get them printed using LogFilter.

void main() async {
  print("hello");
  logger.d("hello");
  print("hi");
}

final Logger logger = Logger(
  filter: MyFilter(),
);

class MyFilter extends LogFilter {
  @override
  bool shouldLog(LogEvent event) {
    return true;
  }
}

I get no output when I run flutter run --release. How do I get them logged?

iphone x and version 14.7.1

[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-x64, locale en-US)
    • Flutter version 2.2.3 at
    • Framework revision f4abaa0735 (8 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • 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.10+0-b96-7281165)

[✓] Connected device (2 available)
    •  • ios            • iOS 14.7.1
    • Chrome (web)             • chrome                                   • web-javascript • Google Chrome 92.0.4515.159

• No issues found!
cdg720 commented 3 years ago

never mind

to see logs in ios release mode, open "devices and simulators" in xcode "windows" tab. in "devices and simulators", click "open console" and you see logs show up there

cdg720 commented 3 years ago

by the way, regular prints also show up in that console