The Making of Bloop — OMG the logs are too noisy!

Making of Bloop

One of a series of posts about our next app as we make it. It’ll include some details about our technology and design choices and challenges.

Since I added some functionality to Bloop that uses Flint, we have been getting Flint’s detailed logging for free. You can however have too much of a good thing.

By default Flint’s logging will let you know when every action you perform starts and completes or fails. As I have added actions for some of the on-screen controls that show in our content player, the console output has become a bit too noisy.

Flint’s logging lets you toggle logging levels per-topic (a Feature is a topic) at runtime, so all I had to do was call this for the features that are too noisy and set the log level to warning on those, as I want debug for everything else in the app at the moment.

What we were getting was a mix of our on-screen controls logging as well as output from Flint’s internal workings.

🐞 16:58:18.428 Debug • main | Activity 'Dispatch' | OSDFeatures/PlayerOSDFeature/#ShowPlayerOSDAction | Starting | State: XXXXXX
🐞 16:58:18.428 Debug • main | Activity 'Dispatch' | OSDFeatures/PlayerOSDFeature/#ShowPlayerOSDAction | Completed (success (not closing action stack)) | State: XXXXXX
🐞 16:58:18.428 Debug • N/A | Activity 'Intent Dispatch' | FlintFeatures/SiriIntentsFeature | Action completed but did not return an intent to donate: Request 5 for PlayerOSDFeature action ShowPlayerOSDAction

The fix was very simple, but I had forgotten my own Flint API for this and hadn’t yet written up Flint documentation for it, so I added it. I changed my code so that the App delegate does this:


FlintFeatures.setLoggingLevel(.warning)
OSDFeatures.setLoggingLevel(.warning)

All features that are sub-features of those feature groups are now quiet as a mouse. All the other features of the app retain the default logging level.

The Author

Marc Palmer (Twitter, Mastodon) is a consultant and software engineer specialising in Apple platforms. He currently works on the iOS team of Concepts sketching app, as well as his own apps like screenshot framing and backgrounds app Sharehot and video subtitling app Captionista. He created the Flint open source framework. He can also do a pretty good job of designing app products. You can find out more here.