Package org.gradle.logging.internal

Examples of org.gradle.logging.internal.LoggingCommandLineConverter


            String temp = logLevel.toString().toLowerCase().replace('_', ' '); //replace underscores in the name with spaces
            this.toString = Character.toUpperCase(temp.charAt(0)) + temp.substring(1);

            //add the command line character to the end (so if an error message says use a log level, you can easily translate)
            String commandLineCharacter = new LoggingCommandLineConverter().getLogLevelCommandLine( logLevel );
            if( commandLineCharacter != null && !commandLineCharacter.equals( "" ))
            {
               this.toString += " (-" + commandLineCharacter + ")";
            }
        }
View Full Code Here


    /**
    * This creates an array of wrapper objects suitable for passing to the constructor of the log level combo box.
    */
    private Vector<LogLevelWrapper> getLogLevelWrappers() {
        Collection<LogLevel> collection = new LoggingCommandLineConverter().getLogLevels();

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

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

View Full Code Here

    public BuildLogLevelMixIn(ProviderOperationParameters parameters) {
        this.parameters = parameters;
    }

    public LogLevel getBuildLogLevel() {
        LoggingCommandLineConverter converter = new LoggingCommandLineConverter();
        CommandLineParser parser = new CommandLineParser().allowUnknownOptions().allowMixedSubcommandsAndOptions();
        converter.configure(parser);
        ParsedCommandLine parsedCommandLine = parser.parse(parameters.getArguments(Collections.<String>emptyList()));
        //configure verbosely only if arguments do not specify any log level.
        if (parameters.getVerboseLogging(false) && !parsedCommandLine.hasAnyOption(converter.getLogLevelOptions())) {
            return LogLevel.DEBUG;
        }

        LoggingConfiguration loggingConfiguration = converter.convert(parsedCommandLine, new LoggingConfiguration());
        return loggingConfiguration.getLogLevel();
    }
View Full Code Here

            this.loggingConfiguration = loggingConfiguration;
            this.action = action;
        }

        public void execute(ExecutionListener executionListener) {
            CommandLineConverter<LoggingConfiguration> loggingConfigurationConverter = new LoggingCommandLineConverter();
            CommandLineConverter<BuildLayoutParameters> buildLayoutConverter = new LayoutCommandLineConverter();
            BuildLayoutParameters buildLayout = new BuildLayoutParameters();
            CommandLineParser parser = new CommandLineParser();
            loggingConfigurationConverter.configure(parser);
            buildLayoutConverter.configure(parser);
            parser.allowUnknownOptions();
            parser.allowMixedSubcommandsAndOptions();
            try {
                ParsedCommandLine parsedCommandLine = parser.parse(args);
                loggingConfigurationConverter.convert(parsedCommandLine, loggingConfiguration);
                buildLayoutConverter.convert(parsedCommandLine, buildLayout);
            } catch (CommandLineArgumentException e) {
                // Ignore, deal with this problem later
            }
View Full Code Here

    /**
     * This creates an array of wrapper objects suitable for passing to the constructor of the log level combo box.
     */
    private Vector<LogLevelWrapper> getLogLevelWrappers() {
        Collection<LogLevel> collection = new LoggingCommandLineConverter().getLogLevels();

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

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

View Full Code Here

            String temp = logLevel.toString().toLowerCase().replace('_', ' '); //replace underscores in the name with spaces
            this.toString = Character.toUpperCase(temp.charAt(0)) + temp.substring(1);

            //add the command line character to the end (so if an error message says use a log level, you can easily translate)
            String commandLineCharacter = new LoggingCommandLineConverter().getLogLevelCommandLine(logLevel);
            if (commandLineCharacter != null && !commandLineCharacter.equals("")) {
                this.toString += " (-" + commandLineCharacter + ")";
            }
        }
View Full Code Here

TOP

Related Classes of org.gradle.logging.internal.LoggingCommandLineConverter

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.