logger_flutter icon indicating copy to clipboard operation
logger_flutter copied to clipboard

example doesnt do anything on shake

Open logemann opened this issue 6 years ago • 6 comments

on iPhone Simulator the example provided doesnt work. Neither does it work in my very own application. To get it right, on shake i should see the log on the simulator right inside my app right?

logemann avatar Oct 21 '19 13:10 logemann

Some one reported something similar on the main package: https://github.com/leisim/logger/issues/20. Could you try the suggestion from there?

haarts avatar Dec 04 '19 11:12 haarts

I'm having the same issue, can you please create a working sample? Must be some dumb stuff I'm doing...

NightOwlCoder avatar Feb 06 '20 05:02 NightOwlCoder

I tried adding LogConsoleOnShake (to the body of my home screen) and it does not seem to do anything.

My issue was that I was not running a debug build and there is a default debugOnly = true which basically disables the shake feature for release builds. I had to override that to be false.

(This is just temporary while I investigate a mysterious bug that is tricky to reproduce.)

awhitford avatar May 19 '20 20:05 awhitford

I had trouble to make it work, and I found that :

  • logs must be called once the LogConsoleOnShake has been put in the widget tree.
  • debugOnly = false does not seems to work. Sending an APK to someone must be built as debug (flutter build apk --debug)
  • dependencies must be the following :

logger: 0.7.0+1 logger_flutter: ^0.7.1

On Android physical device

g-balas avatar Aug 13 '20 16:08 g-balas

I can't get anything to log on release builds

tamoyal avatar Sep 14 '21 08:09 tamoyal

@tamoyal -- though it's not germane to this issue, not seeing log messages on release builds is intentional. Please see filters in the dependency: logger @https://github.com/leisim/logger/tree/master/lib/src/filters. In particular, DevelopmentFilter, which is used by default. If you want to see logging during release builds, use a different filter.

tek08 avatar Sep 14 '21 18:09 tek08