Package org.gradle.api.logging

Examples of org.gradle.api.logging.LogLevel


                    || level == Level.INFO && (loggerLevel == Level.INFO || loggerLevel == Level.WARN)) {
                // Need to take into account Gradle's LIFECYCLE and QUIET markers. Whether those are set can only be determined
                // for the global log level, but not for the logger's log level (at least not without walking the logger's
                // hierarchy, which is something that Logback is designed to avoid for performance reasons).
                // Hence we base our decision on the global log level.
                LogLevel eventLevel = LogLevelConverter.toGradleLogLevel(level, marker);
                return eventLevel.compareTo(currentLevel) >= 0 ? FilterReply.ACCEPT : FilterReply.DENY;
            }

            return level.isGreaterOrEqual(loggerLevel) ? FilterReply.ACCEPT : FilterReply.DENY;
        }
View Full Code Here


        protected void append(ILoggingEvent event) {
            try {
                ThrowableProxy throwableProxy = (ThrowableProxy) event.getThrowableProxy();
                Throwable throwable = throwableProxy == null ? null : throwableProxy.getThrowable();
                String message = event.getFormattedMessage();
                LogLevel level = LogLevelConverter.toGradleLogLevel(event.getLevel(), event.getMarker());
                outputEventListener.onOutput(new LogEvent(event.getTimeStamp(), event.getLoggerName(), level, message, throwable));
            } catch (Throwable t) {
                // fall back to standard out
                t.printStackTrace(defaultStandardOut);
            }
View Full Code Here

    @TaskAction
    public void doJsHint() {
        RhinoWorkerHandleFactory handleFactory = new DefaultRhinoWorkerHandleFactory(getWorkerProcessBuilderFactory());

        LogLevel logLevel = getProject().getGradle().getStartParameter().getLogLevel();
        RhinoWorkerHandle<JsHintResult, JsHintSpec> rhinoHandle = handleFactory.create(getRhinoClasspath(), createWorkerSpec(), logLevel, new Action<JavaExecSpec>() {
            public void execute(JavaExecSpec javaExecSpec) {
                javaExecSpec.setWorkingDir(getProject().getProjectDir());
            }
        });
View Full Code Here

        spec.setCoffeeScriptJs(getCoffeeScriptJs().getSingleFile());
        spec.setDestinationDir(getDestinationDir());
        spec.setSource(getSource());
        spec.setOptions(getOptions());

        LogLevel logLevel = getProject().getGradle().getStartParameter().getLogLevel();
        CoffeeScriptCompiler compiler = new RhinoCoffeeScriptCompiler(handleFactory, getRhinoClasspath(), logLevel, getProject().getProjectDir());

        setDidWork(compiler.compile(spec).getDidWork());
    }
View Full Code Here

        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Log Level")));
        panel.add(Utility.addLeftJustifiedComponent(logLevelComboBox));

        //initialize our value
        String logLevelName = settingsNode.getValueOfChild(LOG_LEVEL, null);
        LogLevel logLevel = gradlePluginLord.getLogLevel();
        if (logLevelName != null) {
            try {
                logLevel = LogLevel.valueOf(logLevelName);
            } catch (IllegalArgumentException e) //this may happen if the enum changes. We don't want this to stop the whole UI
            {
View Full Code Here

        Vector<LogLevelWrapper> wrappers = new Vector<LogLevelWrapper>();

        Iterator<LogLevel> iterator = collection.iterator();

        while (iterator.hasNext()) {
            LogLevel level = iterator.next();
            wrappers.add(new LogLevelWrapper(level));
        }

        Collections.sort(wrappers, new Comparator<LogLevelWrapper>() {
            public int compare(LogLevelWrapper o1, LogLevelWrapper o2) {
View Full Code Here

        return this;
    }

    @TaskAction
    public void executeTests() {
        LogLevel currentLevel = getCurrentLogLevel();
        TestLogging levelLogging = testLogging.get(currentLevel);
        TestExceptionFormatter exceptionFormatter = getExceptionFormatter(levelLogging);
        TestEventLogger eventLogger = new TestEventLogger(getTextOutputFactory(), currentLevel, levelLogging, exceptionFormatter);
        addTestListener(eventLogger);
        addTestOutputListener(eventLogger);
View Full Code Here

TOP

Related Classes of org.gradle.api.logging.LogLevel

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.