Examples of LoggerManager


Examples of org.codehaus.plexus.logging.LoggerManager

    }

    public static ScmLogger getLogger( PlexusContainer plexusContainer )
        throws ComponentLookupException
    {
        LoggerManager loggerManager = (LoggerManager) plexusContainer.lookup( LoggerManager.ROLE );
        Logger logger = loggerManager.getLoggerForComponent( ScmManager.ROLE );
        return new PlexusLogger( logger );
    }
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

    protected void setUp()
        throws Exception
    {
        super.setUp();

        LoggerManager loggerManager = (LoggerManager) lookup( LoggerManager.ROLE );

        loggerManager.setThreshold( Logger.LEVEL_DEBUG );
    }
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

        // pluginkey = groupId : artifactId : version : goal

        Mojo mojo = (Mojo) lookup( Mojo.ROLE, groupId + ":" + artifactId + ":" + version + ":" + goal );

        LoggerManager loggerManager = (LoggerManager) getContainer().lookup( LoggerManager.class );
       
        Log mojoLogger = new DefaultLog( loggerManager.getLoggerForComponent( Mojo.ROLE ) );

        mojo.setLog( mojoLogger );

        if ( pluginConfiguration != null )
        {
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

        // pluginkey = groupId : artifactId : version : goal

        Mojo mojo = (Mojo) lookup( Mojo.ROLE, groupId + ":" + artifactId + ":" + version + ":" + goal );

        LoggerManager loggerManager = (LoggerManager) getContainer().lookup( LoggerManager.class );
       
        Log mojoLogger = new DefaultLog( loggerManager.getLoggerForComponent( Mojo.ROLE ) );

        mojo.setLog( mojoLogger );

        if ( pluginConfiguration != null )
        {
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

        Maven maven = null;

        MavenExecutionRequest request = null;

        LoggerManager loggerManager = null;

        try
        {
            // logger must be created first
            loggerManager = (LoggerManager) embedder.lookup( LoggerManager.ROLE );

            if ( debug )
            {
                loggerManager.setThreshold( Logger.LEVEL_DEBUG );
            }
            else if ( commandLine.hasOption( CLIManager.QUIET ) )
            {
                // TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
                // Ideally, we could use Warn across the board
                loggerManager.setThreshold( Logger.LEVEL_ERROR );
                // TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
            }

            ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer() );
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

        Maven maven = null;

        MavenExecutionRequest request = null;

        LoggerManager loggerManager = null;

        try
        {
            // logger must be created first
            loggerManager = (LoggerManager) embedder.lookup( LoggerManager.ROLE );

            if ( debug )
            {
                loggerManager.setThreshold( Logger.LEVEL_DEBUG );
            }

            ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer() );

            if ( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) )
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

        Maven maven = null;

        MavenExecutionRequest request = null;

        LoggerManager loggerManager = null;

        try
        {
            // logger must be created first
            loggerManager = (LoggerManager) embedder.lookup( LoggerManager.ROLE );

            if ( debug )
            {
                loggerManager.setThreshold( Logger.LEVEL_DEBUG );
            }
            else if ( commandLine.hasOption( CLIManager.QUIET ) )
            {
                // TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
                // Ideally, we could use Warn across the board
                loggerManager.setThreshold( Logger.LEVEL_ERROR );
                // TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
            }

            ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer(),System.getProperties() );
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

  public void setUp()
      throws Exception
  {
    super.setUp();

    LoggerManager loggerManager = (LoggerManager) lookup(LoggerManager.ROLE);

    logger = loggerManager.getLoggerForComponent(this.getClass().toString());

    ldapServerMap = this.getContainer().lookupMap(LdapServer.class);

    for (Entry<String, LdapServer> entry : this.ldapServerMap.entrySet()) {
      if (!entry.getValue().isStarted()) {
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

  /**
   * @deprecated Avoid usage of Plexus apis.
   */
  protected LoggerManager getLoggerManager() throws ComponentLookupException {
    LoggerManager loggerManager = getContainer().lookup(LoggerManager.class);
    // system property helps configure logger - see NXCM-3230
    String testLogLevel = System.getProperty("test.log.level");
    if (testLogLevel != null) {
      if (testLogLevel.equalsIgnoreCase("DEBUG")) {
        loggerManager.setThresholds(Logger.LEVEL_DEBUG);
      }
      else if (testLogLevel.equalsIgnoreCase("INFO")) {
        loggerManager.setThresholds(Logger.LEVEL_INFO);
      }
      else if (testLogLevel.equalsIgnoreCase("WARN")) {
        loggerManager.setThresholds(Logger.LEVEL_WARN);
      }
      else if (testLogLevel.equalsIgnoreCase("ERROR")) {
        loggerManager.setThresholds(Logger.LEVEL_ERROR);
      }
    }
    return loggerManager;
  }
View Full Code Here

Examples of org.codehaus.plexus.logging.LoggerManager

        // Set the Change Package ID to :bypass as we wont have a valid Change Pacakge ID for automated tests
        System.setProperty( "maven.scm.integrity.cpid", ":bypass" );
        // Initialize our scmManager
        scmManager = getScmManager();
        // Initialize our logger
        LoggerManager loggerManager = (LoggerManager) getContainer().lookup( LoggerManager.ROLE );
        logger = new PlexusLogger( loggerManager.getLoggerForComponent( ScmManager.ROLE ) );
        // Construct the SCM Repository and initialize our command execution variables
        ScmRepository repo = scmManager.makeScmRepository( testScmURL );
        iRepo = (IntegrityScmProviderRepository) repo.getProviderRepository();
        fileSet = new ScmFileSet( getTestFile( "target/test-execution" ) );
        parameters = new CommandParameters();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.