Skip to content

Commit

Permalink
Merge pull request #1 from bre7/patch-1
Browse files Browse the repository at this point in the history
Improve logging style
  • Loading branch information
paulofaria committed Jan 2, 2016
2 parents dac0568 + 65e95ea commit b93affb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/LoggerMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public struct LoggerMiddleware: RequestResponseMiddlewareType {
public init() {}

public func respond(request: Request, response: Response) {
let req = "\(request)\n-\n"
let res = "\(response)\n"
let req = "\(request)\n-----\n"
let res = "\(response)\n=====\n"

write(STDOUT_FILENO, req, req.utf8.count)
write(STDOUT_FILENO, res, res.utf8.count)
print("----------------------------------------")
}
}

public let log = LoggerMiddleware()
public let log = LoggerMiddleware()

0 comments on commit b93affb

Please sign in to comment.