Package org.apache.syncope.client.to

Examples of org.apache.syncope.client.to.LoggerTO


        public List<LoggerTO> getLoggers() {
            LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
            List<LoggerTO> result = new ArrayList<LoggerTO>(lc.getLoggerList().size());
            for (Logger logger : lc.getLoggerList()) {
                if (logger.getLevel() != null) {
                    LoggerTO loggerTO = new LoggerTO();
                    loggerTO.setName(logger.getName());
                    loggerTO.setLevel(SyncopeLoggerLevel.fromLevel(logger.getLevel()));
                    result.add(loggerTO);
                }
            }

            return result;
View Full Code Here


        public List<LoggerTO> getLoggers() {
            LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
            List<LoggerTO> result = new ArrayList<LoggerTO>(lc.getLoggerList().size());
            for (Logger logger : lc.getLoggerList()) {
                if (logger.getLevel() != null) {
                    LoggerTO loggerTO = new LoggerTO();
                    loggerTO.setName(logger.getName());
                    loggerTO.setLevel(SyncopeLoggerLevel.fromLevel(logger.getLevel()));
                    result.add(loggerTO);
                }
            }

            return result;
View Full Code Here

        public List<LoggerTO> getLoggers() {
            LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
            List<LoggerTO> result = new ArrayList<LoggerTO>(lc.getLoggerList().size());
            for (Logger logger : lc.getLoggerList()) {
                if (logger.getLevel() != null) {
                    LoggerTO loggerTO = new LoggerTO();
                    loggerTO.setName(logger.getName());
                    loggerTO.setLevel(SyncopeLoggerLevel.fromLevel(logger.getLevel()));
                    result.add(loggerTO);
                }
            }

            return result;
View Full Code Here

        List<LoggerTO> loggers =
                Arrays.asList(restTemplate.getForObject(BASE_URL + "logger/log/list", LoggerTO[].class));
        assertNotNull(loggers);
        int startSize = loggers.size();

        LoggerTO logger = restTemplate.postForObject(BASE_URL + "logger/log/{name}/{level}", null, LoggerTO.class,
                "TEST", "INFO");
        assertNotNull(logger);
        assertEquals(SyncopeLoggerLevel.INFO, logger.getLevel());

        loggers = Arrays.asList(restTemplate.getForObject(BASE_URL + "logger/log/list", LoggerTO[].class));
        assertNotNull(loggers);
        assertEquals(startSize + 1, loggers.size());
    }
View Full Code Here

        public List<LoggerTO> getLoggers() {
            LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
            List<LoggerTO> result = new ArrayList<LoggerTO>(lc.getLoggerList().size());
            for (Logger logger : lc.getLoggerList()) {
                if (logger.getLevel() != null) {
                    LoggerTO loggerTO = new LoggerTO();
                    loggerTO.setName(logger.getName());
                    loggerTO.setLevel(SyncopeLoggerLevel.fromLevel(logger.getLevel()));
                    result.add(loggerTO);
                }
            }

            return result;
View Full Code Here

    private LoggerDAO loggerDAO;

    private List<LoggerTO> list(final SyncopeLoggerType type) {
        List<LoggerTO> result = new ArrayList<LoggerTO>();
        for (SyncopeLogger syncopeLogger : loggerDAO.findAll(type)) {
            LoggerTO loggerTO = new LoggerTO();
            BeanUtils.copyProperties(syncopeLogger, loggerTO);
            result.add(loggerTO);
        }

        auditManager.audit(Category.logger, LoggerSubCategory.list, Result.success,
View Full Code Here

        LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
        Logger logger = lc.getLogger(name);
        logger.setLevel(level);

        LoggerTO result = new LoggerTO();
        BeanUtils.copyProperties(syncopeLogger, result);

        auditManager.audit(Category.logger, LoggerSubCategory.setLevel, Result.success,
                String.format("Successfully set level %s to logger %s (%s)", level, name, expectedType));
View Full Code Here

            throw new NotFoundException("Logger " + name);
        } else if (expectedType != syncopeLogger.getType()) {
            throwInvalidLogger(expectedType);
        }
       
        LoggerTO loggerToDelete = new LoggerTO();
        BeanUtils.copyProperties(syncopeLogger, loggerToDelete);

        // remove SyncopeLogger from local storage, so that LoggerLoader won't load this next time
        loggerDAO.delete(syncopeLogger);
View Full Code Here

        List<LoggerTO> loggers =
                Arrays.asList(restTemplate.getForObject(BASE_URL + "logger/log/list", LoggerTO[].class));
        assertNotNull(loggers);
        int startSize = loggers.size();

        LoggerTO logger = restTemplate.postForObject(BASE_URL + "logger/log/{name}/{level}", null, LoggerTO.class,
                "TEST", "INFO");
        assertNotNull(logger);
        assertEquals(SyncopeLoggerLevel.INFO, logger.getLevel());

        loggers = Arrays.asList(restTemplate.getForObject(BASE_URL + "logger/log/list", LoggerTO[].class));
        assertNotNull(loggers);
        assertEquals(startSize + 1, loggers.size());
    }
View Full Code Here

        public List<LoggerTO> getLoggers() {
            LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
            List<LoggerTO> result = new ArrayList<LoggerTO>(lc.getLoggerList().size());
            for (Logger logger : lc.getLoggerList()) {
                if (logger.getLevel() != null) {
                    LoggerTO loggerTO = new LoggerTO();
                    loggerTO.setName(logger.getName());
                    loggerTO.setLevel(SyncopeLoggerLevel.fromLevel(logger.getLevel()));
                    result.add(loggerTO);
                }
            }

            return result;
View Full Code Here

TOP

Related Classes of org.apache.syncope.client.to.LoggerTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.