Skip to content

Commit a59b07a

Browse files
committed
Improve capitalization in log and error messages
1 parent ca657f5 commit a59b07a

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

vminitd/Sources/vmexec/vmexec.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extension App {
7676
// lookup executable
7777
let path = Path.findPath(currentEnv) ?? Path.getCurrentPath()
7878
guard let resolvedExecutable = Path.lookPath(process.args[0], path: path) else {
79-
throw App.Failure(message: "Failed to find target executable \(process.args[0])")
79+
throw App.Failure(message: "failed to find target executable \(process.args[0])")
8080
}
8181

8282
let executable = strdup(resolvedExecutable.path())

vminitd/Sources/vminitd/Application.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ struct Application {
112112
let server = Initd(log: log, group: eg)
113113

114114
do {
115-
log.info("serve vminitd api")
115+
log.info("serve vminitd API")
116116
try await server.serve(port: vsockPort)
117-
log.info("vminitd api returned...")
117+
log.info("vminitd API returned...")
118118
} catch {
119119
log.error("vminitd boot error \(error)")
120120
exit(1)

vminitd/Sources/vminitd/ManagedProcess.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ final class ManagedProcess: Sendable {
123123

124124
var io: IO
125125
if stdio.terminal {
126-
log.info("setting up terminal IO")
126+
log.info("setting up terminal I/O")
127127
let attrs = Command.Attrs(setsid: false, setctty: false)
128128
process.attrs = attrs
129129
io = try TerminalIO(
@@ -138,7 +138,7 @@ final class ManagedProcess: Sendable {
138138
)
139139
}
140140

141-
log.info("starting io")
141+
log.info("starting I/O")
142142

143143
// Setup IO early. We expect the host to be listening already.
144144
try io.start(process: &process)
@@ -176,7 +176,7 @@ extension ManagedProcess {
176176

177177
let size = MemoryLayout<Int32>.size
178178
guard let piddata = try syncPipe.fileHandleForReading.read(upToCount: size) else {
179-
throw ContainerizationError(.internalError, message: "no pid data from sync pipe")
179+
throw ContainerizationError(.internalError, message: "no PID data from sync pipe")
180180
}
181181

182182
guard piddata.count == size else {
@@ -210,7 +210,7 @@ extension ManagedProcess {
210210

211211
if self.terminal {
212212
log.info(
213-
"wait for pty fd",
213+
"wait for PTY FD",
214214
metadata: [
215215
"id": "\(id)"
216216
])
@@ -219,14 +219,14 @@ extension ManagedProcess {
219219
guard let ptyFd = try self.syncPipe.fileHandleForReading.read(upToCount: size) else {
220220
throw ContainerizationError(
221221
.internalError,
222-
message: "no pty data from sync pipe"
222+
message: "no PTY data from sync pipe"
223223
)
224224
}
225225
let fd = ptyFd.withUnsafeBytes { ptr in
226226
ptr.load(as: Int32.self)
227227
}
228228
log.info(
229-
"received pty fd from container, attaching",
229+
"received PTY FD from container, attaching",
230230
metadata: [
231231
"id": "\(id)"
232232
])
@@ -263,7 +263,7 @@ extension ManagedProcess {
263263
do {
264264
try $0.io.close()
265265
} catch {
266-
self.log.error("failed to close io for process: \(error)")
266+
self.log.error("failed to close I/O for process: \(error)")
267267
}
268268

269269
for waiter in $0.waiters {

0 commit comments

Comments
 (0)