make color logging depend on TERM environment
Merge pull request #1687 from emdete/loggingcolorbyterm

make color logging depend on TERM environment