Add logging #116

merged 7 commits into from Jan 12, 2013

1 participant


An incomplete logging implementation. I'm opening this pull request so it doesn't get lost :)

Initially, this only logs a couple of things (depending on log level):

  • failed partials lookups
  • template cache misses
  • template compilation

See #112 for impetus.

Still to do:

  • performance testing — ensure that this doesn't materially impact performance
  • test coverage
  • documentation

Waiting on the ongoing PHP-FIG logging discussion before proceeding with this.

added some commits Sep 28, 2012
@bobthecow Initial logging proposal.
C.f. #112

Add logging to the Mustache Engine.

 * Add a Logger interface.
 * If a Logger instance is passed to the Engine constructor
   (or added later via setLogger) template compiling,
   caching, errors and missing partials will be logged.
 * Add a Stream Logger and Monolog Logger implementation. You
   should use the Monolog Logger.
@bobthecow Add get/setLevel to AbstractLogger. 782017e
@bobthecow MonologLogger should not extend AbstractLogger. 8c059f5
@bobthecow Handle prematurely closed streams in StreamLogger. d1fb1d8
@bobthecow Update loging to match (proposed) logging PSR. 7522e22
@bobthecow Update logger to implement accepted PSR log spec
Add tests!
@bobthecow Add plug for PSR-3 d252fdd

Annnd it's done :)

@bobthecow bobthecow merged commit 21c2728 into dev Jan 12, 2013
@bobthecow bobthecow referenced this pull request Sep 5, 2013

Extract cache interface #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment