Skip to content

Commit

Permalink
Merge pull request #544 from jolicode/lower-some-logs
Browse files Browse the repository at this point in the history
Rework some log level
  • Loading branch information
lyrixx authored Oct 24, 2024
2 parents 0d40e2a + b41707e commit 47129d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);

Expand All @@ -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,
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Http/HttpDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/ProcessRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);

Expand Down
1 change: 1 addition & 0 deletions tests/Generated/RunExceptionVerboseTest.php.output.txt
Original file line number Diff line number Diff line change
@@ -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).

0 comments on commit 47129d5

Please sign in to comment.