3 ms·
Logging can be useful during development, but PLEASE get rid of it for deployment. The usefulness of my own logging while working at Apple was severely diminish
by herodotus 5y ago
Logging can be useful during development, but PLEASE get rid of it for deployment. The usefulness of my own logging while working at Apple was severely diminished by the sheer volume of logs from other frameworks where (I guess) removing the log message was considered to be of low priority. Just as an example: on my pure production M1 I see thousands (really) of this completely useless log message:
PPSocialHighlightStorage: Constructed social attribution has missing data: (null)
What is that message doing in shipping software? It cannot possibly help anyone.
- outworlder 5y ago> What is that message doing in shipping software? It cannot possibly help anyone. Correct. Those low level messages should not be present in 'production' environments _unless requested_. The ability to log extra info for debugging is fine. Doing that by default isn't. (User-visible) Warnings and errors only please. Can always dig more and turn up verbosity if needed.
- thrower123 5y agoAbsolutely not. Logs are all you're ever likely to get from most production deployments when you need to debug an issue.
- outworlder 5y agoMetrics? Distributed tracing? APM? Many production deployments have far better tools that don't involve grepping every service in the chain.
- waffletower 5y agoYour theology doesn't fit every use case. However, I wouldn't mind the potential benefits of a thoughtful culling of extraneous logging in MacOS.
- spaetzleesser 5y agoLogs are most likely the only data you can get about problems with deployed software. They have saved my ass many times.
- xg15 5y agoGood point, but often you can solve this by setting log levels appropriately. Usually something like "DEBUG for my own modules/packages, WARN for 3rd party libs or frameworks, TRACE for that particular class I'm currently debugging" gives you back your sanity.