1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 03:50:08 +02:00

👌 Improve logging

This commit is contained in:
2022-10-12 22:40:48 +02:00
parent ad46f51d73
commit 8a6656d3e2
5 changed files with 6 additions and 6 deletions

View File

@ -26,9 +26,7 @@ class FakeShellTest: XCTestCase {
.delayed(2, "Goodbye world")
])
let output = await greeting.output(didReceiveOutput: { output, _ in
print(output)
})
let output = await greeting.output(didReceiveOutput: { output, _ in })
XCTAssertEqual("Hello world\nGoodbye world", output.out)
}

View File

@ -80,7 +80,7 @@ class PhpHelper {
await self.createSymlink(dotless)
}
} catch {
print(error)
Log.err(error)
Log.err("Could not write PHP Monitor helper for PHP \(version) to \(destination))")
}
}

View File

@ -91,7 +91,7 @@ class RealShell: ShellProtocol {
// Seriously slow down how long it takes for the shell to return output
// (in order to debug or identify async issues)
if ProcessInfo.processInfo.environment["SLOW_SHELL_MODE"] != nil {
print("[SLOW SHELL] \(command)")
Log.info("[SLOW SHELL] \(command)")
await delay(seconds: 3.0)
}

View File

@ -36,7 +36,7 @@ public class TestableShell: ShellProtocol {
// Seriously slow down the shell's return rate in order to debug or identify async issues
if ProcessInfo.processInfo.environment["SLOW_SHELL_MODE"] != nil {
print("[SLOW SHELL] \(command)")
Log.info("[SLOW SHELL] \(command)")
await delay(seconds: 3.0)
}

View File

@ -60,6 +60,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
#if DEBUG
logger.verbosity = .performance
// Use a "working" test configuration
TestableConfigurations.working.apply()
#endif