'See logs before & after app restart

I have my iPhone app running on device, I can see logs in xcode.

Then, I what to see logs about what is happening when app restart.

So, I press home button twice -> swipe up to stop my app, then launch the app again. But I can't see any log in xcode anymore.

How can I see logs of my app continuously before & after my app restart in xcode?

==== UPDATE ===

I mean app log. OK, I can narrow my question to: How can I see logs again after I restarted my app? (device is connected to my mac book , I saw app logs in xcode before restarting, but can't find a way to see app logs after I restarted my app).



Solution 1:[1]

In case you want to just show the device logs you may want to take a look at this answer:

https://stackoverflow.com/a/19148654/691977

Solution 2:[2]

For anybody who faces this, do this from Xcode menus:

Debug>Attach to Process> Select your process from the list.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 Mahdi Moqadasi