marceloverdijk/lesscss-java — pull request #16 by spmiller (2013-01-09 16:49:37+00:00)
Title: Add pluggable logging interface

In pull request #8 commons logging was added to stop messages spamming stdout. On a project that doesn't have commons-logging, this introduces an unwanted dependency.

This patch moves the logging behind an interface, which means individual projects can choose their desired logging strategy. By default the existing commons-logging method is used, but this can be changed by calling the `LessCompiler` constructor with a different `Logger`.

Three different `Logger`s are provided:
* A logger that delegates to commons-logging: `CommonsLogger` (default)
* A logger that prints to stdout and stderr: `StdLogger`
* A logger that stores the last message in memory, suitable for a test: `LastMessageLogger`