Add logging #116

Merged
merged 7 commits into from Jan 12, 2013

1 participant

@bobthecow
Owner

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
@bobthecow
Owner

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.
cd4e6b3
@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!
1515f51
@bobthecow Add plug for PSR-3 d252fdd
@bobthecow
Owner

Annnd it's done :)

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

Extract cache interface #166

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