Skip to content

Commit

Permalink
Merge pull request #30 from haroldiedema/feature/silent-logging
Browse files Browse the repository at this point in the history
Changed info() logging to debug()
  • Loading branch information
haroldiedema authored Oct 18, 2016
2 parents f7c8011 + bc37caf commit 77470ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Listener/EntityChangedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function preFlush(PreFlushEventArgs $event)
$mutated_fields = $this->meta_mutation_provider->getMutatedFields($em, $entity, $original);

if (!empty($mutated_fields)) {
$this->logger->info(
$this->logger->debug(
'Going to notify a change (preFlush) to {entity_class}, which has {mutated_fields}',
[
'entity_class' => get_class($entity),
Expand Down Expand Up @@ -133,7 +133,7 @@ public function prePersist(LifecycleEventArgs $event)

$mutated_fields = $this->meta_mutation_provider->getMutatedFields($em, $entity, null);

$this->logger->info(
$this->logger->debug(
'Going to notify a change (prePersist) to {entity_class}, which has {mutated_fields}',
[
'entity_class' => get_class($entity),
Expand Down
4 changes: 2 additions & 2 deletions test/Listener/EntityChangedListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testPreFlushWithMutatedFields()
->getFullChangeSet($this->em->reveal())
->willReturn($this->genericEntityDataProvider($entity));
$this->meta_annotation_provider->isTracked($this->em->reveal(), $entity)->willReturn(true);
$this->logger->info(Argument::cetera())->shouldBeCalled();
$this->logger->debug(Argument::cetera())->shouldBeCalled();
$this->meta_mutation_provider->isEntityManaged($this->em->reveal(), $entity)->willReturn(true);
$this->meta_mutation_provider->createOriginalEntity($this->em->reveal(), $entity)->willReturn($original);
$this->meta_mutation_provider->getMutatedFields($this->em->reveal(), $entity, $original)->willReturn(['id']);
Expand Down Expand Up @@ -171,7 +171,7 @@ public function testPreFlushWithInitializedProxy()
$this->meta_annotation_provider->isTracked($this->em->reveal(), $entity->reveal())->willReturn(true);
$this->meta_mutation_provider->isEntityManaged($this->em->reveal(), $entity->reveal())->willReturn(true);
$entity->__isInitialized()->willReturn(true);
$this->logger->info(Argument::cetera())->shouldBeCalled();
$this->logger->debug(Argument::cetera())->shouldBeCalled();
$this->meta_mutation_provider->createOriginalEntity($this->em->reveal(), $entity)->willReturn($original);
$this->meta_mutation_provider
->getMutatedFields($this->em->reveal(), $entity->reveal(), $original)
Expand Down

0 comments on commit 77470ac

Please sign in to comment.