JAVA-26071 | log.info instead of system.out.println() + removed unused file appender

This commit is contained in:
gaepi 2023-10-10 20:37:32 +02:00
parent 25263d4125
commit b9439eab8d
4 changed files with 11 additions and 5 deletions

View File

@ -1,14 +1,16 @@
package com.baeldung.bridge;
import static com.baeldung.util.LoggerUtil.LOG;
public class BridgePatternDriver {
public static void main(String[] args) {
//a square with red color
Shape square = new Square(new Red());
System.out.println(square.draw());
LOG.info(square.draw());
//a triangle with blue color
Shape triangle = new Triangle(new Blue());
System.out.println(triangle.draw());
LOG.info(triangle.draw());
}
}

View File

@ -1,5 +1,7 @@
package com.baeldung.composite;
import static com.baeldung.util.LoggerUtil.LOG;
/**
* Created by Gebruiker on 5/1/2018.
*/
@ -14,7 +16,7 @@ public class FinancialDepartment implements Department {
}
public void printDepartmentName() {
System.out.println(getClass().getSimpleName());
LOG.info(getClass().getSimpleName());
}
public Integer getId() {

View File

@ -1,5 +1,7 @@
package com.baeldung.composite;
import static com.baeldung.util.LoggerUtil.LOG;
/**
* Created by Gebruiker on 5/1/2018.
*/
@ -14,7 +16,7 @@ public class SalesDepartment implements Department {
}
public void printDepartmentName() {
System.out.println(getClass().getSimpleName());
LOG.info(getClass().getSimpleName());
}
public Integer getId() {

View File

@ -1,6 +1,6 @@
# Root logger
log4j.rootLogger=INFO, file, stdout
log4j.rootLogger=INFO, stdout
# Write to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender