4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\DependencyInjection\Compiler;
15 * Used to format logging messages during the compilation.
17 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
19 class LoggingFormatter
21 public function formatRemoveService(CompilerPassInterface $pass, $id, $reason)
23 return $this->format($pass, sprintf('Removed service "%s"; reason: %s.', $id, $reason));
26 public function formatInlineService(CompilerPassInterface $pass, $id, $target)
28 return $this->format($pass, sprintf('Inlined service "%s" to "%s".', $id, $target));
31 public function formatUpdateReference(CompilerPassInterface $pass, $serviceId, $oldDestId, $newDestId)
33 return $this->format($pass, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $serviceId, $oldDestId, $newDestId));
36 public function formatResolveInheritance(CompilerPassInterface $pass, $childId, $parentId)
38 return $this->format($pass, sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId));
41 public function format(CompilerPassInterface $pass, $message)
43 return sprintf('%s: %s', get_class($pass), $message);