added a function template in the logger class.

This way, the logger can write different data types to the log file, without
having to convert them to a string first