'Determine the log prefix to use for messages related to
C{applicationObject}, which may or may not be an
L{interfaces.ILoggingContext} provider.
@return: A C{str} giving the log prefix to use.'

def _getLogPrefix(self, applicationObject):

    if interfaces.ILoggingContext.providedBy(applicationObject):
        return applicationObject.logPrefix()
    return applicationObject.__class__.__name__
