Skip to content

Commit

Permalink
Rename plugin log prefix (bamarni#100)
Browse files Browse the repository at this point in the history
Since the config in `extra` is `bamarni-bin`, I think it's better to keep the prefix `[bamarni-bin]` instead of `[bamarni-bin-plugin]`.
  • Loading branch information
theofidry committed Jul 8, 2022
1 parent 09a868e commit 6788f23
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions e2e/scenario1/expected.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[bamarni-bin-plugin] Current working directory: /path/to/project/e2e/scenario1
[bamarni-bin-plugin] Configuring bin directory to /path/to/project/e2e/scenario1/vendor/bin.
[bamarni-bin-plugin] Checking namespace vendor-bin/ns1
[bamarni-bin-plugin] Changed current directory to vendor-bin/ns1.
[bamarni-bin-plugin] Running `@composer update --verbose --working-dir='.'`.
[bamarni-bin] Current working directory: /path/to/project/e2e/scenario1
[bamarni-bin] Configuring bin directory to /path/to/project/e2e/scenario1/vendor/bin.
[bamarni-bin] Checking namespace vendor-bin/ns1
[bamarni-bin] Changed current directory to vendor-bin/ns1.
[bamarni-bin] Running `@composer update --verbose --working-dir='.'`.
Loading composer repositories with package information
Updating dependencies
Dependency resolution completed in 0.000 seconds
Expand All @@ -13,10 +13,10 @@ Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
[bamarni-bin-plugin] Changed current directory to /path/to/project/e2e/scenario1.
[bamarni-bin-plugin] Checking namespace vendor-bin/ns2
[bamarni-bin-plugin] Changed current directory to vendor-bin/ns2.
[bamarni-bin-plugin] Running `@composer update --verbose --working-dir='.'`.
[bamarni-bin] Changed current directory to /path/to/project/e2e/scenario1.
[bamarni-bin] Checking namespace vendor-bin/ns2
[bamarni-bin] Changed current directory to vendor-bin/ns2.
[bamarni-bin] Running `@composer update --verbose --working-dir='.'`.
Loading composer repositories with package information
Updating dependencies
Dependency resolution completed in 0.000 seconds
Expand All @@ -27,4 +27,4 @@ Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
[bamarni-bin-plugin] Changed current directory to /path/to/project/e2e/scenario1.
[bamarni-bin] Changed current directory to /path/to/project/e2e/scenario1.
2 changes: 1 addition & 1 deletion src/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ private function log(string $message, bool $debug): void
? IOInterface::VERBOSE
: IOInterface::NORMAL;

$this->io->writeError('[bamarni-bin-plugin] '.$message, true, $verbosity);
$this->io->writeError('[bamarni-bin] '.$message, true, $verbosity);
}
}
4 changes: 2 additions & 2 deletions tests/LoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function standardMessageProvider(): iterable
);

$message = 'Hello world!';
$expected = '[bamarni-bin-plugin] Hello world!'.PHP_EOL;
$expected = '[bamarni-bin] Hello world!'.PHP_EOL;

foreach ($notLoggedVerbosities as $verbosity) {
yield [$verbosity, $message, ''];
Expand Down Expand Up @@ -92,7 +92,7 @@ public static function debugMessageProvider(): iterable
);

$message = 'Hello world!';
$expected = '[bamarni-bin-plugin] Hello world!'.PHP_EOL;
$expected = '[bamarni-bin] Hello world!'.PHP_EOL;

foreach ($notLoggedVerbosities as $verbosity) {
yield [$verbosity, $message, ''];
Expand Down

0 comments on commit 6788f23

Please sign in to comment.