Skip to content

Commit

Permalink
fix: feedback from review
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-devfront committed Nov 20, 2024
1 parent 7d270f1 commit 25f5c1d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions classes/Log/WebLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ public function log($level, string $message, array $context = []): void
$message = $this->cleanFromSensitiveData($message);
parent::log($level, $message, $context);

$log = $this->formatLog($level, $message);

if ($level === self::INFO) {
$this->lastInfo = $log;
$this->lastInfo = $message;
}

$log = $this->formatLog($level, $message);

$this->normalMessages[] = $log;

// deprecated : todo need to be removed after NEW UI is completed.
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/Log/WebLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testLastInfoIsRegistered()
$logger = new WebLogger();
$logger->log(WebLogger::INFO, 'Hello');

$this->assertSame('INFO - Hello', $logger->getLastInfo());
$this->assertSame('Hello', $logger->getLastInfo());
}

public function testSeveralLastInfoAreRegistered()
Expand All @@ -42,7 +42,7 @@ public function testSeveralLastInfoAreRegistered()
$logger->log(WebLogger::INFO, 'Hello');
$logger->log(WebLogger::INFO, 'Good bye');

$this->assertSame('INFO - Good bye', $logger->getLastInfo());
$this->assertSame('Good bye', $logger->getLastInfo());
$infos = $logger->getInfos();
$this->assertSame([
'INFO - Hello',
Expand Down Expand Up @@ -101,7 +101,7 @@ public function testWholeLogContentIsProperlyOrdered()
$logger->log(WebLogger::WARNING, 'Oh no 2');
$logger->log(WebLogger::INFO, 'INFO #2');

$this->assertEquals('INFO - INFO #2', $logger->getLastInfo());
$this->assertEquals('INFO #2', $logger->getLastInfo());

$this->assertEquals([
'INFO - INFO #1',
Expand Down
2 changes: 1 addition & 1 deletion views/templates/components/progress-bar.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div data-component="progress-bar" class="progress log-progress__bar">
<div class="progress-bar"
role="progressbar"
data-title-template="{{ "Progress is {progress_percentage}%"|trans() }}"
data-title-template="{{ "Progress is {progress_percentage}%"|trans({}) }}"
aria-valuenow="0"
aria-valuemin="0"
aria-valuemax="100"
Expand Down

0 comments on commit 25f5c1d

Please sign in to comment.