issue #308. Added an option not to append newline automatically when using a custom log formatter
#308 incorporated changes suggested by Ernesto and Dmitry to make the '\n' appending logic in the file logger more clear and performant
#308 optimized conditional checking for newline characters
Merge pull request #310 from skoleckm/master

issue #308.