Skip to content

Commit 720dcca

Browse files
author
sfomuseumbot
committed
Increase logging
1 parent aeee7f9 commit 720dcca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/SwifterProtomaps/SwifterProtomaps.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,17 @@ public func ServeProtomapsTiles(_ opts: ServeProtomapsOptions) -> ((HttpRequest)
118118
return .raw(400, "Bad Request", rsp_headers, {_ in })
119119
}
120120

121+
opts.Logger?.debug("Read data from \(path) start: \(start) stop: \(stop)")
122+
121123
let next = stop + 1
122124

123125
let body: Data!
124126
// file.seek(toFileOffset: start)
125127

126128
do {
127129

130+
opts.Logger?.debug("Seek \(path) to \(start)")
131+
128132
if opts.UseFileDescriptor {
129133
try fd?.seek(offset: Int64(start), from: FileDescriptor.SeekOrigin.start)
130134
} else {
@@ -137,6 +141,8 @@ public func ServeProtomapsTiles(_ opts: ServeProtomapsOptions) -> ((HttpRequest)
137141
return .raw(500, "Internal Server Error", rsp_headers, {_ in })
138142
}
139143

144+
opts.Logger?.debug("Read data from \(path) to \(next)")
145+
140146
if opts.UseFileDescriptor {
141147

142148
guard let data = readData(from: fd!.rawValue, length: next) else {

0 commit comments

Comments
 (0)