Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
def clearLogs(wichObject):
    '''
    Clears the logs associated with the object using the logManager
    '''
    return logManager().clearLogs(wichObject)
Exemplo n.º 6
0
def doLog(wichObject, level, message, source=UNKNOWN, avoidDuplicates=True):
    logger.debug('{} {} {}'.format(wichObject, level, message))
    logManager().doLog(wichObject, level, message, source, avoidDuplicates)
Exemplo n.º 7
0
def doLog(wichObject, level, message, source=UNKNOWN, avoidDuplicates=True):
    logger.debug('{} {} {}'.format(wichObject, level, message))
    logManager().doLog(wichObject, level, message, source, avoidDuplicates)
Exemplo n.º 8
0
def clearLogs(wichObject):
    '''
    Clears the logs associated with the object using the logManager
    '''
    return logManager().clearLogs(wichObject)
Exemplo n.º 9
0
def clearLogs(wichObject: 'Model') -> None:
    """
    Clears the logs associated with the object using the logManager
    """
    return logManager().clearLogs(wichObject)