Thursday, November 5, 2020

Unified logging in iOS

 One of most important use of unified logging is that it facilitates us to see the logs from extensions.

Using apple xcode doesn't show the logs in it from extension.

All we have to do is use the following import

    import os.log

If you want to log something use the below statement

  os_log("")

Now you can see all this logs printed in terminal. 


P.S:

It can be very useful while you are working with extensions. Because we have to attach the extension with xcode for us to actovate the breakpoint inside  extension. Till we attach lot of things can happen we may want to know that's when the unified logging comes to our rescue.