Getting log messages to work and show up while the app is not in the foreground