Skip to content

Commit 6f10ae0

Browse files
authored
Logging & Metrics
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.
2 parents 251d4a0 + 8176b20 commit 6f10ae0

File tree

87 files changed

+13229
-931
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+13229
-931
lines changed

Documentation/Classes.html

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Classes Reference</title>
5+
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
6+
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
7+
<meta charset='utf-8'>
8+
<script src="js/jquery.min.js" defer></script>
9+
<script src="js/jazzy.js" defer></script>
10+
11+
</head>
12+
<body>
13+
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
14+
<a title="Classes Reference"></a>
15+
<header>
16+
<div class="content-wrapper">
17+
<p><a href="index.html">Atom Docs</a> (99% documented)</p>
18+
</div>
19+
</header>
20+
<div class="content-wrapper">
21+
<p id="breadcrumbs">
22+
<a href="index.html">Atom Reference</a>
23+
<img id="carat" src="img/carat.png" />
24+
Classes Reference
25+
</p>
26+
</div>
27+
<div class="content-wrapper">
28+
<nav class="sidebar">
29+
<ul class="nav-groups">
30+
<li class="nav-group-name">
31+
<a href="Classes.html">Classes</a>
32+
<ul class="nav-group-tasks">
33+
<li class="nav-group-task">
34+
<a href="Classes/Atom.html">Atom</a>
35+
</li>
36+
<li class="nav-group-task">
37+
<a href="Classes/Atom/AuthenticationMethod.html">– AuthenticationMethod</a>
38+
</li>
39+
<li class="nav-group-task">
40+
<a href="Classes/Atom/AuthorizationEndpoint.html">– AuthorizationEndpoint</a>
41+
</li>
42+
<li class="nav-group-task">
43+
<a href="Classes/Atom/BaseURL.html">– BaseURL</a>
44+
</li>
45+
<li class="nav-group-task">
46+
<a href="Classes/Atom/BasicCredential.html">– BasicCredential</a>
47+
</li>
48+
<li class="nav-group-task">
49+
<a href="Classes/Atom/ClientCredential.html">– ClientCredential</a>
50+
</li>
51+
<li class="nav-group-task">
52+
<a href="Classes/Atom/HeaderItem.html">– HeaderItem</a>
53+
</li>
54+
<li class="nav-group-task">
55+
<a href="Classes/Atom/Method.html">– Method</a>
56+
</li>
57+
<li class="nav-group-task">
58+
<a href="Classes/Atom/Response.html">– Response</a>
59+
</li>
60+
<li class="nav-group-task">
61+
<a href="Classes/Atom/TokenCredential.html">– TokenCredential</a>
62+
</li>
63+
<li class="nav-group-task">
64+
<a href="Classes/Atom/URLPath.html">– URLPath</a>
65+
</li>
66+
<li class="nav-group-task">
67+
<a href="Classes/Atom/Service.html">– Service</a>
68+
</li>
69+
<li class="nav-group-task">
70+
<a href="Classes/Atom/ServiceConfiguration.html">– ServiceConfiguration</a>
71+
</li>
72+
</ul>
73+
</li>
74+
<li class="nav-group-name">
75+
<a href="Enums.html">Enumerations</a>
76+
<ul class="nav-group-tasks">
77+
<li class="nav-group-task">
78+
<a href="Enums/AtomError.html">AtomError</a>
79+
</li>
80+
<li class="nav-group-task">
81+
<a href="Enums/RequestableError.html">RequestableError</a>
82+
</li>
83+
</ul>
84+
</li>
85+
<li class="nav-group-name">
86+
<a href="Extensions.html">Extensions</a>
87+
<ul class="nav-group-tasks">
88+
<li class="nav-group-task">
89+
<a href="Extensions/Bool.html">Bool</a>
90+
</li>
91+
<li class="nav-group-task">
92+
<a href="Extensions/Optional.html">Optional</a>
93+
</li>
94+
<li class="nav-group-task">
95+
<a href="Extensions/URLRequest.html">URLRequest</a>
96+
</li>
97+
<li class="nav-group-task">
98+
<a href="Extensions/URLResponse.html">URLResponse</a>
99+
</li>
100+
<li class="nav-group-task">
101+
<a href="Extensions/URLSessionTask.html">URLSessionTask</a>
102+
</li>
103+
<li class="nav-group-task">
104+
<a href="Extensions/URLSessionTaskMetrics.html">URLSessionTaskMetrics</a>
105+
</li>
106+
</ul>
107+
</li>
108+
<li class="nav-group-name">
109+
<a href="Protocols.html">Protocols</a>
110+
<ul class="nav-group-tasks">
111+
<li class="nav-group-task">
112+
<a href="Protocols/BasicCredentialConvertible.html">BasicCredentialConvertible</a>
113+
</li>
114+
<li class="nav-group-task">
115+
<a href="Protocols/ClientCredentialConvertible.html">ClientCredentialConvertible</a>
116+
</li>
117+
<li class="nav-group-task">
118+
<a href="Protocols.html#/s:4Atom5ModelP">Model</a>
119+
</li>
120+
<li class="nav-group-task">
121+
<a href="Protocols/Requestable.html">Requestable</a>
122+
</li>
123+
<li class="nav-group-task">
124+
<a href="Protocols/TokenCredentialWritable.html">TokenCredentialWritable</a>
125+
</li>
126+
</ul>
127+
</li>
128+
</ul>
129+
</nav>
130+
<article class="main-content">
131+
<section>
132+
<section class="section">
133+
<h1>Classes</h1>
134+
<p>The following classes are available globally.</p>
135+
136+
</section>
137+
<section class="section task-group-section">
138+
<div class="task-group">
139+
<ul>
140+
<li class="item">
141+
<div>
142+
<code>
143+
<a name="/s:4AtomAAC"></a>
144+
<a name="//apple_ref/swift/Class/Atom" class="dashAnchor"></a>
145+
<a class="token" href="#/s:4AtomAAC">Atom</a>
146+
</code>
147+
</div>
148+
<div class="height-container">
149+
<div class="pointer-container"></div>
150+
<section class="section">
151+
<div class="pointer"></div>
152+
<div class="abstract">
153+
<p>The lightweight &amp; delightful networking library.</p>
154+
155+
<a href="Classes/Atom.html" class="slightly-smaller">See more</a>
156+
</div>
157+
<div class="declaration">
158+
<h4>Declaration</h4>
159+
<div class="language">
160+
<p class="aside-title">Swift</p>
161+
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">Atom</span></code></pre>
162+
163+
</div>
164+
</div>
165+
</section>
166+
</div>
167+
</li>
168+
</ul>
169+
</div>
170+
</section>
171+
</section>
172+
<section id="footer">
173+
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-03-18)</p>
174+
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.11.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
175+
</section>
176+
</article>
177+
</div>
178+
</body>
179+
</div>
180+
</html>

0 commit comments

Comments
 (0)