Yubico/yubikey-ksm — pull request #16 by mig5 (2014-07-07 01:56:34+00:00)
Title: Standardise logging in YK-KSM to be like YK-VAL and don't log by default

Per https://github.com/Yubico/yubikey-val/issues/21 and comments seen at http://coderinaworldofcode.blogspot.com.au/2012/10/yubikey-key-storage-module-review.html, it would be nice if the KSM didn't log lots of debug and plaintext decrypted stuff by default, given the sensitivity of this component.

Additionally the YK-KSM's logging is inconsistent with the YK-VAL's logging functions.

The following change makes the YK-KSM logging methodology consistent with YK-VAL's logger functions. It also introduces a '$logging' boolean for the config, as flag to disable or enable logging entirely.

It defaults to FALSE (off) for security, but can be switched easily.

This change also implies (re?)introduction of /var/log/ykval.log rather than /var/log/auth.log (making https://github.com/Yubico/yubikey-ksm/issues/14 obsolete)

Unsure if there is a better way to handle it all (log only certain 'levels' and not others?), so this pull request is just a suggestion, feel free to use ideas in it.