Пример #1
0
def test_get_logging_levels():
    logging.getLogger('system').setLevel(logging.INFO)
    logging.getLogger('world').setLevel(logging.WARNING)
    logging.getLogger('nodenet').setLevel(logging.DEBUG)
    res = micropsi.get_logging_levels()
    assert res['system'] == 'INFO'
    assert res['world'] == 'WARNING'
    assert res['nodenet'] == 'DEBUG'
Пример #2
0
def index():
    first_user = usermanager.users == {}
    user_id, permissions, token = get_request_data()
    return _add_world_list("viewer",
        mode="all",
        first_user=first_user,
        logging_levels=runtime.get_logging_levels(),
        version=VERSION,
        user_id=user_id,
        permissions=permissions)
Пример #3
0
def show_dashboard():
    user_id, permissions, token = get_request_data()
    return template("viewer", mode="dashboard", logging_levels=runtime.get_logging_levels(), user_id=user_id, permissions=permissions, token=token, version=VERSION)
Пример #4
0
def monitors():
    user_id, permissions, token = get_request_data()
    return template("viewer", mode="monitors", logging_levels=runtime.get_logging_levels(), version=VERSION, user_id=user_id, permissions=permissions)
Пример #5
0
def index():
    first_user = usermanager.users == {}
    user_id, permissions, token = get_request_data()
    return _add_world_list("viewer", mode="all", first_user=first_user, logging_levels=runtime.get_logging_levels(), version=VERSION, user_id=user_id, permissions=permissions, console=INCLUDE_CONSOLE)
Пример #6
0
def test_get_logging_levels():
    logging.getLogger('system').setLevel(logging.INFO)
    logging.getLogger('world').setLevel(logging.WARNING)
    res = micropsi.get_logging_levels()
    assert res['system'] == 'INFO'
    assert res['world'] == 'WARNING'
Пример #7
0
def get_logging_levels():
    """ Set the logging levels """
    return True, runtime.get_logging_levels()