def __init__(self, comic_section):
     self.config = Config([os.path.join(util.getProjectPath(), "config/config.desc")])
     self.comic_name = self.config.getComicName(comic_section)
     self.start_url = self.config.getComicStartUrl(comic_section)
     self.comic_path = os.path.join(util.getDataPath(), self.comic_name)
     self.quoteNumberForNextLink = self.config.getQuoteNumberForNextLink(comic_section)
     self.quoteNumberForImageLink = self.config.getQuoteNumberForImageLink(comic_section)
     self.localisationStringForNextLink = self.config.getLocalisationStringForNextLink(comic_section)
     self.localisationOffsetForNextLink = self.config.getOffsetForNextLink(comic_section)
     self.localisationStringForImageLink = self.config.getLocalisationStringForImageLink(comic_section)
     self.localisationOffsetForImageLink = self.config.getOffsetForImageLink(comic_section)
     self.logger = loggermanager.getLogger(__name__ + "." + comic_section)
Ejemplo n.º 2
0
#!/usr/bin/env python
# --*-- encoding: iso-8859-1 --*--

import logging.config
import os
import util

logging.config.fileConfig(os.path.join(util.getProjectPath(), "config/logger.conf"))

def getLogger(name):
    """Retourne un logger avec le nom passé en paramètre
        -name: Une string contenant le nom du logger
    """
    return logging.getLogger(name)