Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging & Metrics #5

Merged
merged 1 commit into from
Mar 22, 2020
Merged

Logging & Metrics #5

merged 1 commit into from
Mar 22, 2020

Conversation

michaelbabiy
Copy link
Contributor

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.

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`:

```swift
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.
Copy link
Collaborator

@Defilan Defilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @michaelbabiy . Sorry it took me so long to approve :)

@michaelbabiy
Copy link
Contributor Author

Thanks @Defilan

@michaelbabiy michaelbabiy reopened this Mar 22, 2020
@michaelbabiy michaelbabiy merged commit 6f10ae0 into master Mar 22, 2020
@michaelbabiy michaelbabiy deleted the m/log branch March 23, 2020 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants