'write a message to the log'

def __call__(self, msg):

    if (not hasattr(self, '_file')):
        self._openfile()
    self._file.write((str(msg) + '\n'))
    if (not self._buffering):
        self._file.flush()
