You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
The use of the logger in the Transformer code can be awkward when appenders are used that list in reverse chronological order. Or even just when each call to $log->debug() is stored in the database as a separate record rather then in a flat file. For example, we are using the Instant Articles SDK in a Drupal module here https://github.com/BurdaMagazinOrg/module-fb_instant_articles and the logs come out like this:
Thanks for flagging this @m4olivei. We could consider implementing a custom renderer, but I think just concatenating the message with newlines as you suggest is probably a simpler and better approach. We'll look into it.
Im considering to have a better log on the Transformation process.
Like we have today "warnings" stored under the Transformer object, we can have the step-by-step log there, and we can flush it as we finish to process the file.
Something like:
// processing and transforming code$transformer->appendLog($message)
// after transformation ends$logger->debug($transformer->getFormattedLog());
The use of the logger in the Transformer code can be awkward when appenders are used that list in reverse chronological order. Or even just when each call to $log->debug() is stored in the database as a separate record rather then in a flat file. For example, we are using the Instant Articles SDK in a Drupal module here https://github.com/BurdaMagazinOrg/module-fb_instant_articles and the logs come out like this:
http://take.ms/y59qK
Could we instead build up the whole message as a string using newlines, before calling $log->debug with the entire message?
https://github.com/facebook/facebook-instant-articles-sdk-php/blob/master/src/Facebook/InstantArticles/Transformer/Rules/Rule.php#L20,L25
The text was updated successfully, but these errors were encountered: