Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)
Creates a python logger which loggs into the custom publisher log.

@param name:    Name of the logger instance (see python logging module)
@type name:     string
@return:        Python logging object

        def getPublisherLogger(name):
    """
    Creates a python logger which loggs into the custom publisher log.

    @param name:    Name of the logger instance (see python logging module)
    @type name:     string
    @return:        Python logging object
    """

    # get logger
    logger = logging.getLogger(name)
    global logHandler
    if not logHandler:
        # create new handler
        filepath = getLogFilePath(error_log=False)
        if filepath:
            logHandler = logging.FileHandler(filepath)
            # register formatter
            logHandler.setFormatter(logging.Formatter(fmt=LOG_FORMAT,
                                                      datefmt=LOG_DATEFORMAT))

    if logHandler and logHandler not in logger.handlers:
        # register it
        logger.addHandler(logHandler)
    return logger
        


src/f/t/ftw.publisher.sender-2.2.0/ftw/publisher/sender/__init__.py   ftw.publisher.sender(Download)
from ftw.publisher.core.utils import getPublisherLogger, getPublisherErrorLogger
from zope.i18nmessageid import MessageFactory
 
 
message_factory = MessageFactory('ftw.publisher.sender')
    @return: Logging instance
    """
    return getPublisherLogger('ftw.publisher.sender')
 
 

src/f/t/ftw.publisher.core-2.4.0/ftw/publisher/core/__init__.py   ftw.publisher.core(Download)
from ftw.publisher.core.utils import getPublisherLogger
from zope.i18nmessageid import MessageFactory
 
 
_ = MessageFactory('ftw.publisher.core')
    @return logger instance
    """
    return getPublisherLogger('ftw.publisher.core')
 

src/f/t/ftw.publisher.receiver-2.0.2/ftw/publisher/receiver/__init__.py   ftw.publisher.receiver(Download)
from ftw.publisher.core.utils import getPublisherLogger
 
 
def getLogger():
    """
    Returns a logger instance (see python logging module).
 
    @return logger instance
    """
    return getPublisherLogger('ftw.publisher.receiver')