@@ -93,44 +93,38 @@ final class WorkflowLogger {
93
93
// MARK: Workflows
94
94
95
95
static func logWorkflowStarted< WorkflowType> ( ref: WorkflowNode < WorkflowType > ) {
96
- if #available( iOS 12 . 0 , macOS 10 . 14 , * ) {
97
- guard WorkflowLogging . config. logLifetimes else { return }
98
-
99
- let signpostID = OSSignpostID ( log: . active, object: ref)
100
- os_signpost (
101
- . begin,
102
- log: . active,
103
- name: " Alive " ,
104
- signpostID: signpostID,
105
- " Workflow: %{public}@ " ,
106
- String ( describing: WorkflowType . self)
107
- )
108
- }
96
+ guard WorkflowLogging . config. logLifetimes else { return }
97
+
98
+ let signpostID = OSSignpostID ( log: . active, object: ref)
99
+ os_signpost (
100
+ . begin,
101
+ log: . active,
102
+ name: " Alive " ,
103
+ signpostID: signpostID,
104
+ " Workflow: %{public}@ " ,
105
+ String ( describing: WorkflowType . self)
106
+ )
109
107
}
110
108
111
109
static func logWorkflowFinished< WorkflowType> ( ref: WorkflowNode < WorkflowType > ) {
112
- if #available( iOS 12 . 0 , macOS 10 . 14 , * ) {
113
- guard WorkflowLogging . config. logLifetimes else { return }
110
+ guard WorkflowLogging . config. logLifetimes else { return }
114
111
115
- let signpostID = OSSignpostID ( log: . active, object: ref)
116
- os_signpost ( . end, log: . active, name: " Alive " , signpostID: signpostID)
117
- }
112
+ let signpostID = OSSignpostID ( log: . active, object: ref)
113
+ os_signpost ( . end, log: . active, name: " Alive " , signpostID: signpostID)
118
114
}
119
115
120
116
static func logSinkEvent< Action: WorkflowAction > ( ref: AnyObject , action: Action ) {
121
- if #available( iOS 12 . 0 , macOS 10 . 14 , * ) {
122
- guard WorkflowLogging . config. logActions else { return }
123
-
124
- let signpostID = OSSignpostID ( log: . active, object: ref)
125
- os_signpost (
126
- . event,
127
- log: . active,
128
- name: " Sink Event " ,
129
- signpostID: signpostID,
130
- " Event for workflow: %{public}@ " ,
131
- String ( describing: Action . WorkflowType. self)
132
- )
133
- }
117
+ guard WorkflowLogging . config. logActions else { return }
118
+
119
+ let signpostID = OSSignpostID ( log: . active, object: ref)
120
+ os_signpost (
121
+ . event,
122
+ log: . active,
123
+ name: " Sink Event " ,
124
+ signpostID: signpostID,
125
+ " Event for workflow: %{public}@ " ,
126
+ String ( describing: Action . WorkflowType. self)
127
+ )
134
128
}
135
129
136
130
// MARK: Rendering
@@ -139,35 +133,31 @@ final class WorkflowLogger {
139
133
ref: WorkflowNode < WorkflowType > ,
140
134
isRootNode: Bool
141
135
) {
142
- if #available( iOS 12 . 0 , macOS 10 . 14 , * ) {
143
- guard shouldLogRenderTimings (
144
- isRootNode: isRootNode
145
- ) else { return }
146
-
147
- let signpostID = OSSignpostID ( log: . active, object: ref)
148
- os_signpost (
149
- . begin,
150
- log: . active,
151
- name: " Render " ,
152
- signpostID: signpostID,
153
- " Render Workflow: %{public}@ " ,
154
- String ( describing: WorkflowType . self)
155
- )
156
- }
136
+ guard shouldLogRenderTimings (
137
+ isRootNode: isRootNode
138
+ ) else { return }
139
+
140
+ let signpostID = OSSignpostID ( log: . active, object: ref)
141
+ os_signpost (
142
+ . begin,
143
+ log: . active,
144
+ name: " Render " ,
145
+ signpostID: signpostID,
146
+ " Render Workflow: %{public}@ " ,
147
+ String ( describing: WorkflowType . self)
148
+ )
157
149
}
158
150
159
151
static func logWorkflowFinishedRendering< WorkflowType> (
160
152
ref: WorkflowNode < WorkflowType > ,
161
153
isRootNode: Bool
162
154
) {
163
- if #available( iOS 12 . 0 , macOS 10 . 14 , * ) {
164
- guard shouldLogRenderTimings (
165
- isRootNode: isRootNode
166
- ) else { return }
155
+ guard shouldLogRenderTimings (
156
+ isRootNode: isRootNode
157
+ ) else { return }
167
158
168
- let signpostID = OSSignpostID ( log: . active, object: ref)
169
- os_signpost ( . end, log: . active, name: " Render " , signpostID: signpostID)
170
- }
159
+ let signpostID = OSSignpostID ( log: . active, object: ref)
160
+ os_signpost ( . end, log: . active, name: " Render " , signpostID: signpostID)
171
161
}
172
162
173
163
// MARK: - Utilities
0 commit comments