Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Commit

Permalink
Log unfilterable meta data #56
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaber-de committed Feb 17, 2016
1 parent 51e577e commit 42e12ee
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions inc/Controller/TmpLogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use
W2M\Import\Common,
W2M\Import\Data,
W2M\Import\Filter,
W2M\Import\Type,
W2M\Log\Handler,
W2M\Log\Recorder,
Expand Down Expand Up @@ -246,6 +247,35 @@ function() use ( $logger ) {
$logger->info( 'Resolving pending term ancestor relations' );
}
);

/**
* unfilterable meta data
*/
add_action(
'w2m_import_meta_not_filterable',
/**
* @param Filter\ValueFilterableInterface $filter
* @param Type\MetaRecordIndexInterface $meta_index
* @param Type\ImportMetaInterface $meta
*/
function(
Filter\ValueFilterableInterface $filter,
Type\MetaRecordIndexInterface $meta_index,
Type\ImportMetaInterface $meta
) use( $logger ) {

$msg = "Meta data not filterable";
$data = [
'type' => $meta_index->type(),
'key' => $meta_index->key(),
'object_id' => $meta_index->object_id(),
'filter' => get_class( $filter )
];
$logger->info( $msg, $data );
},
10,
3
);
}

/**
Expand Down

0 comments on commit 42e12ee

Please sign in to comment.