- 2014-03-27: MongoDB Watchdog module ported to Drupal 8 at the Szeged Dev Days.
- 2014-01-26: My post on the Symfony web profiler in Silex selected in Week of Symfony. w00t !
- 2013-09-20 to 29: Working on Drupal 8 EntityAPI at the extended code sprints during and around DrupalCon Prague
- 2012-08-19: Working on Drupal 8 EntityAPI at Drupalcon Munich
- 2012-06-15: Working on Drupal 8 EntityAPI at DrupalDevDays Barcelona
- 2012-03-23: Working on the future Drupal Document Oriented Storage at DrupalCon Denver. D8 or later ?
Bets are onLater
Rethinking watchdog(): Monolog vs log4php
It is based on the famous log4j package from the Java world, and from uses of this package I have seen on customer sites, I feel that it carries a lot of useless baggage, and is - in my opinion - significantly less of a good match than Monolog for Drupal 8.
Monolog vs log4php : equivalences
There is some degree of equivalence between the Monolog and log4php components:
|Log an event||Logger||Logger||Very similar|
|Store an event||Handler||Appender||both can be chained, group, control bubbling (Monolog) / filtering (log4php)|
|Format an event representation||Formatter||Layout||log4php layouts can format a group of events, Monolog formatters format an individual event|
|Massage event data||Processor||Renderer||Not so similar. Monolog processors will often add extra data, while log4php Renderers are typically used to format non-string events as strings.|
Monolog vs log4php : other points of comparison
|Deployment||Composer / Packagist||Maven||Drupal 8 already uses composer|
|Master repository||Github||Apache SVN||Not so significant, but...|
|File layout/naming||PSR-0||Non-compliant with PSR-0|
|Class loading||PSR-0 autoloading||
||Would need tweaking our loading process|
|Configuration||Nothing specified: use code||XML, PHP, info||This is probably the strongest argument for log4php|
|Langages used||PHP||PHP, XML, DTD, XSLT, YAML||The non-PHP languages in log4php are mostly about integration and configuration|
|Actual size: code + tests||3.7k LoC||7.8k LoC||0.4k lines of XML, DTD, XSLT, YAML in log4PHP|
|Actual size: code||1.7k LoC||3.7k LoC||Less than 100 lines of non-PHP code(DTD) in log4php|
|Testing||PHPUnit, with Mock objects||PHPUnit, with Mock objects|
|Loggging destinations provided||Amqp, ChromePHP, Cube, FirePHP, Gelf, MongoDB, Null, RotatingFile, Stream, [Native|Swift]Mailer, Syslog, Test||Console, Echo, [Daily|Rolling]File, Mail[Event], MongoDB, Null, PDO, PHP trigger_event, Socket, Syslog||Monolog Stream subsumes log4j Console, File, and Socket. Soon in Monolog: logstash Handler. My D8 patch for Monolog includes a DBTNG (PDO) Handler.|
|License||MIT License||Apache License, version 2.0|