Apply consistent log argument quoting for sigle- and multi-valued args

This commit is contained in:
Michael Osipov 2021-01-01 14:09:07 +01:00
parent a2d29b221d
commit 2201698234
7 changed files with 18 additions and 18 deletions

View File

@ -458,7 +458,7 @@ private void validateProjects( List<MavenProject> projects, MavenExecutionReques
if ( projectsMap.containsKey( pluginKey ) )
{
LOGGER.warn( "{} uses {} as extensions, which is not possible within the same reactor build. "
LOGGER.warn( "'{}' uses '{}' as extension which is not possible within the same reactor build. "
+ "This plugin was pulled from the local repository!", project.getName(), plugin.getKey() );
}
}

View File

@ -936,7 +936,7 @@ public void addAttachedArtifact( Artifact artifact )
int index = attachedArtifacts.indexOf( artifact );
if ( index >= 0 )
{
LOGGER.warn( "artifact {} already attached, replace previous instance", artifact );
LOGGER.warn( "artifact '{}' already attached, replacing previous instance", artifact );
attachedArtifacts.set( index, artifact );
}
else

View File

@ -74,7 +74,7 @@ public List<MavenProject> selectProjects( List<File> files, MavenExecutionReques
if ( !result.getProblems().isEmpty() && LOGGER.isWarnEnabled() )
{
LOGGER.warn( "" );
LOGGER.warn( "Some problems were encountered while building the effective model for {}",
LOGGER.warn( "Some problems were encountered while building the effective model for '{}'",
result.getProject().getId() );
for ( ModelProblem problem : result.getProblems() )

View File

@ -76,7 +76,7 @@ public List<MavenProject> collectProjects( MavenExecutionRequest request ) throw
}
else
{
logger.debug( "Multi module project collection failed: {}"
logger.debug( "Multi module project collection failed:{}"
+ "Detected a POM file next to a .mvn folder in a parent directory ({}). "
+ "Maven assumed that POM file to be the parent of the requested project ({}), but it turned "
+ "out that it was not. Another project collection strategy will be executed as result.",
@ -91,7 +91,7 @@ public List<MavenProject> collectProjects( MavenExecutionRequest request ) throw
if ( fallThrough )
{
logger.debug( "Multi module project collection failed: {}"
logger.debug( "Multi module project collection failed:{}"
+ "Detected that one of the modules of this multi module project uses another module as "
+ "plugin extension which still needed to be built. This is not possible within the same "
+ "reactor build. Another project collection strategy will be executed as result.",
@ -115,8 +115,8 @@ private File getMultiModuleProjectPomFile( MavenExecutionRequest request )
if ( !multiModuleProjectPom.exists() )
{
logger.info( "Maven detected that the requested POM file is part of a multi module project, "
+ "but could not find a pom.xml file in the multi module root directory: '"
+ request.getMultiModuleProjectDirectory() + "'. " );
+ "but could not find a pom.xml file in the multi module root directory '{}'.",
request.getMultiModuleProjectDirectory() );
logger.info( "The reactor is limited to all projects under: " + request.getPom().getParent() );
return request.getPom();
}

View File

@ -790,7 +790,7 @@ protected void configure()
}
catch ( Exception e )
{
slf4jLogger.warn( "Failed to read extensions descriptor {}: {}", extensionsFile, e.getMessage() );
slf4jLogger.warn( "Failed to read extensions descriptor from '{}'", extensionsFile, e );
}
return Collections.emptyList();
}
@ -818,11 +818,11 @@ private ClassRealm setupContainerRealm( ClassWorld classWorld, ClassRealm coreRe
extRealm.setParentRealm( coreRealm );
slf4jLogger.debug( "Populating class realm {}", extRealm.getId() );
slf4jLogger.debug( "Populating class realm '{}'", extRealm.getId() );
for ( File file : extClassPath )
{
slf4jLogger.debug( " Included {}", file );
slf4jLogger.debug( " included '{}'", file );
extRealm.addURL( file.toURI().toURL() );
}
@ -871,7 +871,7 @@ private List<File> parseExtClasspath( CliRequest cliRequest )
{
File file = resolveFile( new File( jar ), cliRequest.workingDirectory );
slf4jLogger.debug( " Included {}", file );
slf4jLogger.debug( " included '{}'", file );
jars.add( file );
}
@ -1006,12 +1006,12 @@ private int execute( CliRequest cliRequest )
if ( !cliRequest.showErrors )
{
slf4jLogger.error( "To see the full stack trace of the errors, re-run Maven with the {} switch.",
slf4jLogger.error( "To see the full stack trace of the errors, re-run Maven with the '{}' switch.",
buffer().strong( "-e" ) );
}
if ( !slf4jLogger.isDebugEnabled() )
{
slf4jLogger.error( "Re-run Maven using the {} switch to enable full debug logging.",
slf4jLogger.error( "Re-run Maven using the '{}' switch to enable full debug logging.",
buffer().strong( "-X" ) );
}
@ -1299,9 +1299,9 @@ void toolchains( CliRequest cliRequest )
eventSpyDispatcher.onEvent( toolchainsRequest );
slf4jLogger.debug( "Reading global toolchains from {}",
slf4jLogger.debug( "Reading global toolchains from '{}'",
getLocation( toolchainsRequest.getGlobalToolchainsSource(), globalToolchainsFile ) );
slf4jLogger.debug( "Reading user toolchains from {}",
slf4jLogger.debug( "Reading user toolchains from '{}'",
getLocation( toolchainsRequest.getUserToolchainsSource(), userToolchainsFile ) );
ToolchainsBuildingResult toolchainsResult = toolchainsBuilder.build( toolchainsRequest );

View File

@ -137,9 +137,9 @@ public void process( CliRequest cliRequest )
request.getEventSpyDispatcher().onEvent( settingsRequest );
}
logger.debug( "Reading global settings from {}",
logger.debug( "Reading global settings from '{}'",
getLocation( settingsRequest.getGlobalSettingsSource(), settingsRequest.getGlobalSettingsFile() ) );
logger.debug( "Reading user settings from {}",
logger.debug( "Reading user settings from '{}'",
getLocation( settingsRequest.getUserSettingsSource(), settingsRequest.getUserSettingsFile() ) );
SettingsBuildingResult settingsResult = settingsBuilder.build( settingsRequest );

View File

@ -361,7 +361,7 @@ public void mojoSkipped( ExecutionEvent event )
{
if ( logger.isWarnEnabled() )
{
logger.warn( "Goal {} requires online mode for execution but Maven is currently offline, skipping",
logger.warn( "Goal '{}' requires online mode for execution but Maven is currently offline, skipping",
event.getMojoExecution().getGoal() );
}
}