added macro guard to enable overriding ENABLE_LOG
Merge pull request #2987 from anishp:master