Exemple #1
0
def doLog(
        wichObject: 'Model',
        level: int,
        message: str,
        source: str = UNKNOWN,
        avoidDuplicates: bool = True
    ) -> None:
    logger.debug('%s %s %s', wichObject, level, message)
    logManager().doLog(wichObject, level, message, source, avoidDuplicates)
Exemple #2
0
def getLogs(wichObject, limit=None):
    '''
    Get the logs associated with "wichObject", limiting to "limit" (default is GlobalConfig.MAX_LOGS_PER_ELEMENT)
    '''
    from uds.core.util.Config import GlobalConfig

    if limit is None:
        limit = GlobalConfig.MAX_LOGS_PER_ELEMENT.getInt()

    return logManager().getLogs(wichObject, limit)
Exemple #3
0
def getLogs(wichObject, limit=None):
    '''
    Get the logs associated with "wichObject", limiting to "limit" (default is GlobalConfig.MAX_LOGS_PER_ELEMENT)
    '''
    from uds.core.util.Config import GlobalConfig

    if limit is None:
        limit = GlobalConfig.MAX_LOGS_PER_ELEMENT.getInt()

    return logManager().getLogs(wichObject, limit)
Exemple #4
0
def getLogs(wichObject: 'Model', limit: typing.Optional[int] = None) -> typing.List[typing.Dict]:
    """
    Get the logs associated with "wichObject", limiting to "limit" (default is GlobalConfig.MAX_LOGS_PER_ELEMENT)
    """
    from uds.core.util.config import GlobalConfig

    if limit is None:
        limit = GlobalConfig.MAX_LOGS_PER_ELEMENT.getInt()

    return logManager().getLogs(wichObject, limit)
Exemple #5
0
def clearLogs(wichObject):
    '''
    Clears the logs associated with the object using the logManager
    '''
    return logManager().clearLogs(wichObject)
Exemple #6
0
def doLog(wichObject, level, message, source=UNKNOWN, avoidDuplicates=True):
    logger.debug('{} {} {}'.format(wichObject, level, message))
    logManager().doLog(wichObject, level, message, source, avoidDuplicates)
Exemple #7
0
def doLog(wichObject, level, message, source=UNKNOWN, avoidDuplicates=True):
    logger.debug('{} {} {}'.format(wichObject, level, message))
    logManager().doLog(wichObject, level, message, source, avoidDuplicates)
Exemple #8
0
def clearLogs(wichObject):
    '''
    Clears the logs associated with the object using the logManager
    '''
    return logManager().clearLogs(wichObject)
Exemple #9
0
def clearLogs(wichObject: 'Model') -> None:
    """
    Clears the logs associated with the object using the logManager
    """
    return logManager().clearLogs(wichObject)