antler119 / system_tray

A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.
MIT License
214 stars 51 forks source link

Remove swift print log code #26

Closed tomoyuki28jp closed 2 years ago

tomoyuki28jp commented 2 years ago

When I update my system tray menu on macOS every 5 seconds to show elapsed time, my debug console is flooed with following messages:

method: SetContextMenu
method: SetSystemTrayInfo
method: SetContextMenu
method: SetSystemTrayInfo
method: SetContextMenu
method: SetSystemTrayInfo
method: SetContextMenu
method: SetSystemTrayInfo
method: SetContextMenu
method: SetSystemTrayInfo
method: SetContextMenu
method: SetSystemTrayInfo
method: SetContextMenu
method: SetSystemTrayInfo
method: SetContextMenu
method: SetSystemTrayInfo
method: SetContextMenu

Maybe we don't need the debug print code any more? if you want to keep printing them, I think it’s better to surround the print with If DEBUG clause so that the log message won’t be shown in production apps.

#if DEBUG
  print("method: \(call.method)")
#endif
antler119 commented 2 years ago

Thanks for your advice