Generating Log Messages from Your Code | Apple Developer Documentation
Record useful debugging and analysis information, and include dynamic content in your messages.