def getLogFile(self, filename=None):
    if (filename is None):
        if self.has_option('daemon', 'logFile'):
            filename = self.get('daemon', 'logFile')
        else:
            raise ConfigError('The config file has no logFile option.')
    if self.has_option('daemon', 'logPath'):
        path = self.get('daemon', 'logPath')
        if (not os.path.exists(path)):
            os.makedirs(path)
        elif (not os.path.isdir(path)):
            raise ConfigError('The logPath value in the config should point to a directory.')
        path = os.path.join(path, filename)
    else:
        path = filename
    return path
def getLogFile(self, filename=None):
    if (filename is None):
        if self.has_option('daemon', 'logFile'):
            filename = self.get('daemon', 'logFile')
        else:
            raise ConfigError('The config file has no logFile option.')
    if self.has_option('daemon', 'logPath'):
        path = self.get('daemon', 'logPath')
        if (not os.path.exists(path)):
            os.makedirs(path)
        elif (not os.path.isdir(path)):
            raise ConfigError('The logPath value in the config should point to a directory.')
        path = os.path.join(path, filename)
    else:
        path = filename
    return path