diff --git a/src/EventDispatcher.php b/src/EventDispatcher.php index c1ff35e0..908f7830 100644 --- a/src/EventDispatcher.php +++ b/src/EventDispatcher.php @@ -20,7 +20,7 @@ public function __construct( public function dispatch(object $event, ?string $eventName = null): object { - $this->logger->info("Dispatching event {$eventName}", [ + $this->logger->debug("Dispatching event {$eventName}", [ 'event' => $event, ]); @@ -32,7 +32,7 @@ public function dispatch(object $event, ?string $eventName = null): object */ public function addListener(string $eventName, $listener, int $priority = 0): void { - $this->logger->info("Adding listener for event {$eventName}", [ + $this->logger->debug("Adding listener for event {$eventName}", [ 'priority' => $priority, 'listener' => $listener, ]); diff --git a/src/Http/HttpDownloader.php b/src/Http/HttpDownloader.php index 1c0563ff..83dc62d1 100644 --- a/src/Http/HttpDownloader.php +++ b/src/Http/HttpDownloader.php @@ -26,7 +26,7 @@ public function __construct( */ public function download(string $url, ?string $filePath = null, string $method = 'GET', array $options = [], bool $stream = true): ResponseInterface { - $this->logger->info('Starting http download', ['url' => $url]); + $this->logger->notice('Starting HTTP download', ['url' => $url]); $lastLogTime = time(); $startTime = microtime(true); diff --git a/src/Runner/ProcessRunner.php b/src/Runner/ProcessRunner.php index e10dafd6..ebf8206b 100644 --- a/src/Runner/ProcessRunner.php +++ b/src/Runner/ProcessRunner.php @@ -157,7 +157,7 @@ public function run( $this->eventDispatcher->dispatch(new Event\ProcessCreatedEvent($process)); - $this->logger->info(\sprintf('Running command: "%s".', $process->getCommandLine()), [ + $this->logger->notice(\sprintf('Running command: "%s".', $process->getCommandLine()), [ 'process' => $process, ]); diff --git a/tests/Generated/RunExceptionVerboseTest.php.output.txt b/tests/Generated/RunExceptionVerboseTest.php.output.txt index eadee0fc..ed97c711 100644 --- a/tests/Generated/RunExceptionVerboseTest.php.output.txt +++ b/tests/Generated/RunExceptionVerboseTest.php.output.txt @@ -1 +1,2 @@ +hh:mm:ss NOTICE [castor] Running command: "echo foo; echo bar>&2; exit 1". ["process" => ["cwd" => "...","env" => [],"runnable" => "echo foo; echo bar>&2; exit 1"]] hh:mm:ss NOTICE [castor] Command finished with an error (exit code=1).