I\'m creating logs using Apple\'s os.log
framework. I\'m just making logs like:
os_log(\"Update: Lat: %{public}f | Long: %{private}f | Remaini
You did not specify iOS, macOS, or tvOS in your question, so I am keeping my answer generic across all platforms.
Review WWDC 2016 - Session 721 - Unified Logging and Activity Tracing.
Logging data is stored in a new compressed binary format (.tracev3
or .logarchive
files), that's what those "numbers" are. You must use Console.app or the log
command line tool to open these files.
You're looking in the wrong place for the log files. From the session video:
Those files are now stored under /var/db/diagnostics with additional supporting files in /var/db/uuidtext. There are new tools to access that data, there's a new Console, a new log command line tool and one of the things you have to keep in mind is because the data is now stored in a binary format you must use the new tools to access it. So you can no longer grep through logs you have to use our tools to do the surfing through it.
There's also another new type of file the .logarchive, which is there for portability of log data. Essentially a .logarchive is a collection of information out of /var/db/diagnostics and you uuidtext collected together into a single file that's easier to transfer to email, to attach to bug reports and the like.
If you redirect stdout or stderr to a file (such as the code in this example), it should be in the Documents directory of your application's sandbox (or whatever directory you specified). Logs written to /var/db/diagnostics are generally unavailable to end users on iOS and tvOS.