本文整理匯總了Java中com.threewks.gaetools.logger.Logger類的典型用法代碼示例。如果您正苦於以下問題:Java Logger類的具體用法?Java Logger怎麽用?Java Logger使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Logger類屬於com.threewks.gaetools.logger包,在下文中一共展示了Logger類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: reindex
import com.threewks.gaetools.logger.Logger; //導入依賴的package包/類
@Override
public int reindex(List<K> keys, int batchSize, ReindexOperation<E> reindexOperation) {
int count = 0;
List<List<K>> batches = Lists.partition(keys, batchSize);
for (List<K> batchKeys : batches) {
List<E> batch = get(batchKeys);
batch = reindexOperation == null ? batch : reindexOperation.apply(batch);
if (reindexOperation != null) {
// we only re-save the batch when a re-index op is supplied, otherwise the data can't have changed.
ofy().save().entities(batch).now();
}
if (shouldSearch()) {
index(batch).complete();
}
count += batch.size();
ofy().clear(); // Clear the Objectify cache to free memory for next batch
Logger.info("Reindexed %d entities of type %s, %d of %d", batch.size(), entityType.getSimpleName(), count, keys.size());
}
return count;
}