mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 03:50:08 +02:00
👌 Improve logging
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
@ -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))")
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
|
||||
#if DEBUG
|
||||
logger.verbosity = .performance
|
||||
|
||||
// Use a "working" test configuration
|
||||
TestableConfigurations.working.apply()
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user