<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Oslog on Andy Ibanez</title><link>https://www.andyibanez.com/tags/oslog/</link><description>Recent content in Oslog on Andy Ibanez</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 09 Sep 2020 07:00:00 -0400</lastBuildDate><atom:link href="https://www.andyibanez.com/tags/oslog/index.xml" rel="self" type="application/rss+xml"/><item><title>Logging Messages With the Unified Logging System on Apple Platforms</title><link>https://www.andyibanez.com/posts/logging-messages-unified-logging-system-apple-platforms/</link><pubDate>Wed, 09 Sep 2020 07:00:00 -0400</pubDate><guid>https://www.andyibanez.com/posts/logging-messages-unified-logging-system-apple-platforms/</guid><description>&lt;p&gt;Last time we &lt;a href="https://www.andyibanez.com/posts/introduction-apples-unified-logging-system-ios14-swift/"&gt;talked about the basics of the Unified Logging System&lt;/a&gt;, we set the basic concepts and code we need to write logs, along with the different logging levels, and more.&lt;/p&gt;
&lt;p&gt;In this article we will talk about actually logging messages, how the framework is &amp;ldquo;smart enough&amp;rdquo; to strip out sensitive user info by default, and how we can control what gets stripped.&lt;/p&gt;
&lt;h1 id="logging-messages"&gt;Logging Messages&lt;/h1&gt;
&lt;p&gt;The framework supports interpolated strings right out of the box when you are using the new system in Swift.&lt;/p&gt;</description></item><item><title>Introduction to Apple's Unified Logging System on iOS 14 in Swift</title><link>https://www.andyibanez.com/posts/introduction-apples-unified-logging-system-ios14-swift/</link><pubDate>Wed, 26 Aug 2020 07:00:00 -0400</pubDate><guid>https://www.andyibanez.com/posts/introduction-apples-unified-logging-system-ios14-swift/</guid><description>&lt;p&gt;It is no surprise that software tend to write logs to a local file as they execute. As events, errors, or exceptional situations occur, a lot of software takes note of them using a local logging solution. This is done because these practices can allow us to troubleshoot problems for our users, find bugs, and in general understand the behavior of our software in untested or lesser tested scenarios.&lt;/p&gt;
&lt;p&gt;When comes to iOS and other Apple platforms, there have always been third party dependencies that allow you to do this. A lot of developers roll their own solution and write events in plain text files. It wasn&amp;rsquo;t until iOS 8 and macOS 10.10 that Apple provided us with a unified logging system that is easy to use and is very performant - &lt;a href="https://developer.apple.com/documentation/os/oslog"&gt;&lt;code&gt;OSLog&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>