Skip to content

Logging & Metrics

Compare
Choose a tag to compare
@michaelbabiy michaelbabiy released this 22 Mar 18:11
· 18 commits to master since this release
6f10ae0

This version of Atom adds the ability to log all network requests to the Console app as well as export all logs to a file.

To take advantage of this new feature, set log property on Atom instance to .on:

let atom: Atom = {
    let atom = Atom()
    atom.log = .on

    return atom
}()

Current implementation uses os_log.

If you choose to use the Console app for monitoring outgoing requests, you can use the following categories and subsystems to filter results.

Categories: Network, Authentication.
Subsystems: Your App’s Bundle Identifier.

Changelog

  • Add and implement required OSLog options.
  • Add and implement required additions to Bool, URLRequest, URLResponse, URLSessionTask, URLSessionTaskMetrics.
  • Introduce and implement Interceptor type.
  • Update implementation of the Service and AuthenticationManager to use new Interceptor for logging requests to the Console.
  • Update the Example app.
  • Update documentation.