org.codehaus.plexus.logging.Logger.error()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(267)

本文整理了Java中org.codehaus.plexus.logging.Logger.error()方法的一些代码示例,展示了Logger.error()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()方法的具体详情如下:
包路径:org.codehaus.plexus.logging.Logger
类名称:Logger
方法名:error

Logger.error介绍

暂无

代码示例

代码示例来源:origin: org.apache.maven/maven-plugin-api

public void error( Throwable error )
{
  logger.error( "", error );
}

代码示例来源:origin: apache/maven

public void error( Throwable error )
{
  logger.error( "", error );
}

代码示例来源:origin: org.apache.maven/maven-plugin-api

public void error( CharSequence content )
{
  logger.error( toString( content ) );
}

代码示例来源:origin: org.apache.maven/maven-plugin-api

public void error( CharSequence content, Throwable error )
{
  logger.error( toString( content ), error );
}

代码示例来源:origin: apache/maven

public void error( CharSequence content, Throwable error )
{
  logger.error( toString( content ), error );
}

代码示例来源:origin: apache/maven

public void error( CharSequence content )
{
  logger.error( toString( content ) );
}

代码示例来源:origin: apache/maven

private void callDelegates( ClassRealm classRealm, RealmType type, ClassLoader parent, List<String> parentImports,
              Map<String, ClassLoader> foreignImports, List<ClassRealmConstituent> constituents )
{
  List<ClassRealmManagerDelegate> delegates = new ArrayList<>( this.delegates );
  if ( !delegates.isEmpty() )
  {
    ClassRealmRequest request =
      new DefaultClassRealmRequest( type, parent, parentImports, foreignImports, constituents );
    for ( ClassRealmManagerDelegate delegate : delegates )
    {
      try
      {
        delegate.setupRealm( classRealm, request );
      }
      catch ( Exception e )
      {
        logger.error( delegate.getClass().getName() + " failed to setup class realm " + classRealm + ": "
          + e.getMessage(), e );
      }
    }
  }
}

代码示例来源:origin: apache/maven

logger.error( "Missing toolchain factory for type: " + type
  + ". Possibly caused by misconfigured project." );
    logger.error( "Misconfigured toolchain.", ex );

代码示例来源:origin: apache/maven

private void disconnectWagon( Wagon wagon )
{
  try
  {
    wagon.disconnect();
  }
  catch ( ConnectionException e )
  {
    logger.error( "Problem disconnecting from wagon - ignoring: " + e.getMessage() );
  }
}

代码示例来源:origin: apache/maven

public Artifact createExtensionArtifact( String groupId, String artifactId, String version )
{
  VersionRange versionRange;
  try
  {
    versionRange = VersionRange.createFromVersionSpec( version );
  }
  catch ( InvalidVersionSpecificationException e )
  {
    // MNG-5368: Log a message instead of returning 'null' silently.
    this.logger.error( String.format(
      "Invalid version specification '%s' creating extension artifact '%s:%s:%s'.",
      version, groupId, artifactId, version ), e );
    return null;
  }
  return artifactFactory.createExtensionArtifact( groupId, artifactId, versionRange );
}

代码示例来源:origin: apache/maven

if ( fact == null )
  logger.error( "Missing toolchain factory for type: " + type
    + ". Possibly caused by misconfigured project." );

代码示例来源:origin: apache/maven

private void releaseWagon( String protocol, Wagon wagon )
{
  try
  {
    container.release( wagon );
  }
  catch ( ComponentLifecycleException e )
  {
    logger.error( "Problem releasing wagon - ignoring: " + e.getMessage() );
    logger.debug( "", e );
  }
}

代码示例来源:origin: apache/maven

public Artifact createPluginArtifact( Plugin plugin )
{
  String version = plugin.getVersion();
  if ( StringUtils.isEmpty( version ) )
  {
    version = "RELEASE";
  }
  VersionRange versionRange;
  try
  {
    versionRange = VersionRange.createFromVersionSpec( version );
  }
  catch ( InvalidVersionSpecificationException e )
  {
    // MNG-5368: Log a message instead of returning 'null' silently.
    this.logger.error( String.format(
      "Invalid version specification '%s' creating plugin artifact '%s'.",
      version, plugin ), e );
    return null;
  }
  return artifactFactory.createPluginArtifact( plugin.getGroupId(), plugin.getArtifactId(), versionRange );
}

代码示例来源:origin: apache/maven

private Set<String> populateRealm( ClassRealm classRealm, List<ClassRealmConstituent> constituents )
{
  Set<String> includedIds = new LinkedHashSet<>();
  if ( logger.isDebugEnabled() )
  {
    logger.debug( "Populating class realm " + classRealm.getId() );
  }
  for ( ClassRealmConstituent constituent : constituents )
  {
    File file = constituent.getFile();
    String id = getId( constituent );
    includedIds.add( id );
    if ( logger.isDebugEnabled() )
    {
      logger.debug( "  Included: " + id );
    }
    try
    {
      classRealm.addURL( file.toURI().toURL() );
    }
    catch ( MalformedURLException e )
    {
      // Not going to happen
      logger.error( e.getMessage(), e );
    }
  }
  return includedIds;
}

代码示例来源:origin: apache/maven

this.logger.error( String.format( "Invalid version specification '%s' creating dependency artifact '%s'.",
                 d.getVersion(), d ), e );
return null;

代码示例来源:origin: apache/maven

private Result<? extends ProjectDependencyGraph> buildGraph( MavenSession session, MavenExecutionResult result )
{
  Result<? extends ProjectDependencyGraph> graphResult = graphBuilder.build( session );
  for ( ModelProblem problem : graphResult.getProblems() )
  {
    if ( problem.getSeverity() == ModelProblem.Severity.WARNING )
    {
      logger.warn( problem.toString() );
    }
    else
    {
      logger.error( problem.toString() );
    }
  }
  if ( !graphResult.hasErrors() )
  {
    ProjectDependencyGraph projectDependencyGraph = graphResult.get();
    session.setProjects( projectDependencyGraph.getSortedProjects() );
    session.setAllProjects( projectDependencyGraph.getAllProjects() );
    session.setProjectDependencyGraph( projectDependencyGraph );
  }
  return graphResult;
}

代码示例来源:origin: apache/maven

logger.error( "invalid reactor failure behavior " + rootSession.getReactorFailureBehavior() );
buildContext.getReactorBuildStatus().halt();

代码示例来源:origin: apache/maven

if ( logger.isDebugEnabled() )
  logger.error( message, e );
  logger.error( message );

代码示例来源:origin: takari/polyglot-maven

log.error("Failed to dynamically load class " + randomClassName, e);
} finally {
  try {
    FileUtils.deleteDirectory(tempDir);
  } catch (IOException e) {
    log.error("Failed to delete temp folder " + tempDir, e);

代码示例来源:origin: apache/maven

logger.error( "Failed to configure legacy local repository: falling back to default" );
session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( session, localRepo ) );

相关文章