Skip to content

Commit 70d6133

Browse files
committed
Upgraded it to log4j2 as well
1 parent cc1fced commit 70d6133

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Diff for: plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ public abstract class AbstractRunMojo extends AbstractMojo {
131131
protected String shareContextPath;
132132

133133
/**
134-
* Share Log4j.properties configuration cannot be customized via extension
134+
* Share Log4j2.properties configuration cannot be customized via extension
135135
* put on the classpath, like on the platform side.
136-
* So we need to override the log4j.properties in share/WEB-INF/classes
136+
* So we need to override the log4j2.properties in share/WEB-INF/classes
137137
* to be able to log from custom code.
138138
* This property can be used to turn off this overriding, to produce a WAR with
139-
* the standard Share log4j.properties file.
139+
* the standard Share log4j2.properties file.
140140
*/
141141
@Parameter(property = "maven.alfresco.useCustomShareLog4jConfig", defaultValue = "true")
142142
protected boolean useCustomShareLog4jConfig;
@@ -452,22 +452,22 @@ protected void copyShareConfigCustom() throws MojoExecutionException {
452452

453453

454454
/**
455-
* Copy a custom Share Log4J config into the share-war/WEB-INF/classes dir.
456-
* There is no custom classpath resolve mechanism for Share log4j,
457-
* to log custom stuff overriding standard log4j.properties is needed.
455+
* Copy a custom Share Log4J2 config into the share-war/WEB-INF/classes dir.
456+
* There is no custom classpath resolve mechanism for Share log4j2,
457+
* to log custom stuff overriding standard log4j2.properties is needed.
458458
*
459459
* @throws MojoExecutionException when any problem appears copying the share log4j configuration
460460
*/
461461
protected void copyShareLog4jConfig() throws MojoExecutionException {
462462
if (!useCustomShareLog4jConfig) {
463-
getLog().info("NOT overriding share/WEB-INF/classes/log4j.properties");
463+
getLog().info("NOT overriding share/WEB-INF/classes/log4j2.properties");
464464
return;
465465
}
466466

467467
final String warOutputDir = getWarOutputDir(SHARE_WAR_PREFIX_NAME);
468468
final String logConfDestDir = warOutputDir + "/WEB-INF/classes";
469469

470-
getLog().info("Copying Share log4j.properties to: " + logConfDestDir);
470+
getLog().info("Copying Share log4j2.properties to: " + logConfDestDir);
471471

472472
executeMojo(
473473
plugin(
@@ -482,7 +482,7 @@ protected void copyShareLog4jConfig() throws MojoExecutionException {
482482
element(name("resource"),
483483
element(name("directory"), "src/test/resources/share"),
484484
element(name("includes"),
485-
element(name("include"), "log4j.properties")
485+
element(name("include"), "log4j2.properties")
486486
),
487487
element(name("filtering"), "true")
488488
)
@@ -886,7 +886,7 @@ protected void startTomcat(boolean fork) throws MojoExecutionException {
886886
own repositories (i.e. the usual Java2 delegation model).
887887
Prevent parent classloader delegation, each webapp loads.
888888
If set to true then you will get a truckload of Solr logging as
889-
the alf_data_dev/solr4/config/log4j-solr.properties file is not picked up.
889+
the alf_data_dev/solr4/config/log4j2-solr.properties file is not picked up.
890890
This also fixes issues with the Google Guava Library, which this tomcat plugin uses
891891
version 10.0.1 of but Solr uses 14.0.1 */
892892
element(name("delegate"), "false"),

0 commit comments

Comments
 (0)