'Clears the system logs'

def clear(self):

    anamon_dir = ('/var/log/cobbler/anamon/%s' % self.system.name)
    if os.path.isdir(anamon_dir):
        logs = filter(os.path.isfile, glob.glob(('%s/*' % anamon_dir)))
    for log in logs:
        try:
            f = open(log, 'w')
            f.truncate()
            f.close()
        except IOError as e:
            self.logger.info(("Failed    to    Truncate    '%s':%s    " % (log, e)))
        except OSError as e:
            self.logger.info(("Failed    to    Truncate    '%s':%s    " % (log, e)))
