protected function TransformerLoggingTrait::setTransformerLogLevel in Facebook Instant Articles 8.2
Set the transformer log level according to the FBIA setting.
2 calls to TransformerLoggingTrait::setTransformerLogLevel()
- FieldItemListNormalizer::__construct in src/
Normalizer/ FieldItemListNormalizer.php - FieldItemListNormalizer constructor.
- TransformerFormatter::__construct in src/
Plugin/ Field/ FieldFormatter/ TransformerFormatter.php - Create a new instance of TransformerFormatter.
File
- src/
TransformerLoggingTrait.php, line 37
Class
- TransformerLoggingTrait
- Useful when you are making use of the FBIA Transformer.
Namespace
Drupal\fb_instant_articlesCode
protected function setTransformerLogLevel() {
if ($log_level = $this->configFactory
->get('fb_instant_articles.settings')
->get('transformer_logging_level')) {
TransformerLog::setLevel($log_level);
}
else {
TransformerLog::setLevel(TransformerLog::ERROR);
}
}