Skip to content

Commit b6cf7fa

Browse files
committed
Finetuned Logs Level for Import and Export operations
On projects with a heavy number of users/mails and frequent sync activity, the great number of logs generated at notice level can become a problem for the infrastructure in production
1 parent 6942762 commit b6cf7fa

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ImportExport/Strategy/MemberActivityImportStrategy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function process($entity)
8282
protected function processEntity($entity)
8383
{
8484
if ($this->logger) {
85-
$this->logger->notice(
85+
$this->logger->info(
8686
sprintf(
8787
'Processing MailChimp Member Activity [email=%s, action=%s]',
8888
$entity->getEmail(),
@@ -109,7 +109,7 @@ protected function processEntity($entity)
109109
$this->context->incrementAddCount();
110110

111111
if ($this->logger) {
112-
$this->logger->notice(
112+
$this->logger->info(
113113
sprintf(
114114
' Activity added for MailChimp Member [id=%d]',
115115
$member->getId()
@@ -119,7 +119,7 @@ protected function processEntity($entity)
119119

120120
return $entity;
121121
} elseif ($this->logger) {
122-
$this->logger->notice(' Activity skipped');
122+
$this->logger->info(' Activity skipped');
123123
}
124124

125125
return null;

ImportExport/Strategy/MemberExportStrategy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function process($entity)
4040
$entity = $this->afterProcessEntity($entity);
4141

4242
if ($this->logger) {
43-
$this->logger->notice(sprintf('Exporting MailChimp Member [id=%s]', $entity->getId()));
43+
$this->logger->info(sprintf('Exporting MailChimp Member [id=%s]', $entity->getId()));
4444
}
4545

4646
return $entity;

ImportExport/Strategy/MemberImportStrategy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ public function process($entity)
3636
$existingEntity = $this->findExistingEntity($entity);
3737
if ($existingEntity) {
3838
if ($this->logger) {
39-
$this->logger->notice('Syncing Existing MailChimp Member [origin_id=' . $entity->getOriginId() . ']');
39+
$this->logger->info('Syncing Existing MailChimp Member [origin_id=' . $entity->getOriginId() . ']');
4040
}
4141

4242
$entity = $this->importExistingMember($entity, $existingEntity);
4343
} else {
4444
if ($this->logger) {
45-
$this->logger->notice('Adding new MailChimp Member [origin_id=' . $entity->getOriginId() . ']');
45+
$this->logger->info('Adding new MailChimp Member [origin_id=' . $entity->getOriginId() . ']');
4646
}
4747

4848
$entity = $this->processEntity($entity, true, true, $this->context->getValue('itemData'));

0 commit comments

Comments
 (0)