Skip to content

Commit cbfabb4

Browse files
committed
Use proper loggers
...
1 parent b399dd6 commit cbfabb4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/httpd-helloworld/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Macro // @Macro-swift
44

55
http.createServer { req, res in
66
// log request
7-
console.log("\(req.method) \(req.url)")
7+
req.log.log("\(req.method) \(req.url)")
88

99
// set content type to HTML
1010
res.writeHead(200, [ "Content-Type": "text/html" ])
@@ -22,5 +22,5 @@ http.createServer { req, res in
2222
res.end()
2323
}
2424
.listen(1337) { server in
25-
console.log("Server listening on http://*:1337/")
25+
server.log.log("Server listening on http://*:1337/")
2626
}

Sources/httpproxy/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ http.createServer { req, res in
4545
_ = req.pipe(proxiedRequest)
4646
}
4747
.listen(1337) { server in
48-
console.log("Server listening on http://0.0.0.0:1337/")
48+
server.log.log("Server listening on http://0.0.0.0:1337/")
4949
}

0 commit comments

Comments
 (0)