Moved log compile flags into compileflags.h
Revised logging implementation & implemented LOG_ONCE macros