I have always appreciated the debug logging pattern commonly used within NodeJS projects. As I worked more with go, I wanted to bring that logging pattern to the language.
kemba logger reads the
KEMBA environment variables to determine if a log line should be output. The logger outputs to
When it is not set, the logger will immediately return, taking no action.
When the value is set (ex.
KEMBA=plugin:fxn:start), the logger will determine if it should be
enabled when instantiated.
The value of these flags can be a simple regex alternative where a wildcard (
*) are replaced with
.* and all terms are prepended with
^ and appended with
$. If a term does not include a wildcard, then an exact match it required.