def adaptStandardLogging(loggerName, logCategory, targetModule):
    """
    Make a logger from the standard library log through the Flumotion logging
    system.

    @param loggerName: The standard logger to adapt, e.g. 'library.module'
    @type loggerName: str
    @param logCategory: The Flumotion log category to use when reporting output
                        from the standard logger, e.g. 'librarymodule'
    @type logCategory: str
    @param targetModule: The name of the module that the logging should look
                         like it's coming from. Use this if you don't want to
                         see the file names and line numbers of the library
                         who's logger you are adapting.
    @type targetModule: str or None
    """
    logger = logging.getLogger(loggerName)
    # if there is already a FluHandler, exit
    if map(lambda h: isinstance(h, LogHandler), logger.handlers):
        return
    logger.setLevel(logLevelToStdLevel(getCategoryLevel(logCategory)))
    logger.addHandler(LogHandler(logCategory, targetModule))