Skip to content

Commit b8cc811

Browse files
committed
Dummy variable renaming
1 parent e63ef36 commit b8cc811

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/JSONLogger.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,18 +171,18 @@ public struct JSONLogger : LogHandler {
171171
#"}"#
172172
).utf8)
173173
}
174-
let dataNoSeparator = prefix + jsonLine + suffix
174+
let lineDataNoSeparator = prefix + jsonLine + suffix
175175

176176
/* We lock, because the writeAll function might split the write in more than 1 write
177177
* (if the write system call only writes a part of the data).
178178
* If another part of the program writes to fd, we might get interleaved data,
179179
* because they cannot be aware of our lock (and we cannot be aware of theirs if they have one). */
180180
JSONLogger.lock.withLock{
181-
let prefix: Data
182-
if Self.isFirstLog {prefix = Data(); Self.isFirstLog = false}
183-
else {prefix = lineSeparator}
181+
let interLogData: Data
182+
if Self.isFirstLog {interLogData = Data(); Self.isFirstLog = false}
183+
else {interLogData = lineSeparator}
184184
/* Is there a better idea than silently drop the message in case of fail? */
185-
_ = try? outputFileDescriptor.writeAll(prefix + dataNoSeparator)
185+
_ = try? outputFileDescriptor.writeAll(interLogData + lineDataNoSeparator)
186186
}
187187
}
188188

0 commit comments

Comments
 (0)