Package grails.build.logging

Examples of grails.build.logging.GrailsConsole


        logger.setOutputPrintStream(System.out);
        logger.setErrorPrintStream(System.err);

        project.addBuildListener(logger);

        GrailsConsole instance = GrailsConsole.getInstance();
        project.addBuildListener(new GrailsConsoleBuildListener(instance));

        if (!instance.isVerbose()) {
            for (Object buildListener : project.getBuildListeners()) {
                if (buildListener instanceof BuildLogger) {
                    ((BuildLogger)buildListener).setMessageOutputLevel(LogLevel.ERR.getLevel());
                }
            }
View Full Code Here


        super(pluginResources, application);
    }

    @Override
    public void loadPlugins() throws PluginException {
        GrailsConsole console = GrailsConsole.getInstance();
        long time = System.currentTimeMillis();
        console.addStatus("Loading plugins started");
        super.loadPlugins();
        console.addStatus("Loading plugins took " + (System.currentTimeMillis() - time));
    }
View Full Code Here

    }

    @Override
    public void doDynamicMethods() {
        long time = System.currentTimeMillis();
        GrailsConsole console = GrailsConsole.getInstance();
        console.addStatus("doWithDynamicMethods started");
        checkInitialised();
        // remove common meta classes just to be sure
        MetaClassRegistry registry = GroovySystem.getMetaClassRegistry();
        for (Class<?> COMMON_CLASS : COMMON_CLASSES) {
            registry.removeMetaClass(COMMON_CLASS);
        }
        for (GrailsPlugin plugin : pluginList) {
            if (plugin.supportsCurrentScopeAndEnvironment()) {
                try {
                    long pluginTime = System.currentTimeMillis();
                    console.addStatus("doWithDynamicMethods for plugin [" + plugin.getName() + "] started");

                    plugin.doWithDynamicMethods(applicationContext);

                    console.addStatus("doWithDynamicMethods for plugin [" + plugin.getName() + "] took " + (System.currentTimeMillis() - pluginTime));
                }
                catch (Throwable t) {
                    console.error(t);
                    console.error("Error configuring dynamic methods for plugin " + plugin + ": " + t.getMessage());
                }
            }
        }
        console.addStatus("doWithDynamicMethods took " + (System.currentTimeMillis() - time));
    }
View Full Code Here

    @Override
    public void doRuntimeConfiguration(RuntimeSpringConfiguration springConfig) {
        long time = System.currentTimeMillis();

        GrailsConsole console = GrailsConsole.getInstance();
        console.addStatus("doWithSpring started");
        checkInitialised();
        for (GrailsPlugin plugin : pluginList) {
            if (plugin.supportsCurrentScopeAndEnvironment()) {
                long pluginTime = System.currentTimeMillis();
                console.addStatus("doWithSpring for plugin [" + plugin.getName() + "] started");
                plugin.doWithRuntimeConfiguration(springConfig);
                console.addStatus("doWithSpring for plugin [" + plugin.getName() + "] took " + (System.currentTimeMillis() - pluginTime));
            }
        }
        console.addStatus("doWithSpring took " + (System.currentTimeMillis() - time));
    }
View Full Code Here

    }

    @Override
    public void doPostProcessing(ApplicationContext ctx) {
        long time = System.currentTimeMillis();
        GrailsConsole console = GrailsConsole.getInstance();
        console.addStatus("doWithApplicationContext started");
        checkInitialised();
        for (GrailsPlugin plugin : pluginList) {
            if (plugin.supportsCurrentScopeAndEnvironment()) {
                long pluginTime = System.currentTimeMillis();
                console.addStatus("doWithApplicationContext for plugin [" + plugin.getName() + "] started");
                plugin.doWithApplicationContext(ctx);
                console.addStatus("doWithApplicationContext for plugin [" + plugin.getName() + "] took " + (System.currentTimeMillis() - pluginTime));
            }
        }
        console.addStatus("doWithApplicationContext took " + (System.currentTimeMillis() - time));
    }
View Full Code Here

        console.addStatus("doWithApplicationContext took " + (System.currentTimeMillis() - time));
    }

    @Override
    public void doArtefactConfiguration() {
        GrailsConsole console = GrailsConsole.getInstance();
        long time = System.currentTimeMillis();
        console.addStatus("doArtefactConfiguration started");
        super.doArtefactConfiguration();
        console.addStatus("doArtefactConfiguration took " + (System.currentTimeMillis() - time));
    }
View Full Code Here

TOP

Related Classes of grails.build.logging.GrailsConsole

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.