#970 single logging framework should be enforced (#982)

* #496 Add pipeline module to parent pom 

* #496: Add main application class and test for pipeline

* #496: Checkstyle format and add log messages on pipeline stages 🎨

* #496: Fill readme sections of pipeline 

* #496: Javadocs and checkstyle formatting 🎨

* #496: Follow PMD checks and add more explanation as block comment on App.java

* #496: Apply requested PR changes by iluwatar 🎨

* #970: Replace log4j usage on commander pattern to Slf4j API 🎨

* #970: Replace log4j usage on dao pattern to Slf4j API 🎨

* #970: Replace log4j usage on data mapper pattern to Slf4j API 🎨

* #970: Remove log4j dependency on data transfer object pom 🔥

* #970: Replace log4j usage on module pattern to Slf4j API 🎨

* #970: Replace log4j usage on serverless pattern to Slf4j API 🎨

This also removes the aws log4j dependency

* #970: Remove unnecessary gitignore line for log4j.xml 🔥

* #970: Remove remaining remnants of log4j 🔥

* #970: Replace System.out logging with appropriate logging methods 🎨

* #970: Replace System.out method references to Logger::info 🎨
This commit is contained in:
Joshua Jimenez
2019-10-14 04:41:11 +08:00
committed by Ilkka Seppälä
parent 72b174619f
commit cfdfedbd2e
50 changed files with 163 additions and 410 deletions

View File

@ -23,6 +23,8 @@
package com.iluwatar.masterworker;
import com.iluwatar.masterworker.system.ArrayTransposeMasterWorker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* <p>The <b><em>Master-Worker</em></b> pattern is used when the problem at hand can be solved by dividing into
@ -45,7 +47,8 @@ import com.iluwatar.masterworker.system.ArrayTransposeMasterWorker;
*/
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Program entry point.
* @param args command line args
@ -60,10 +63,9 @@ public class App {
ArrayResult result = (ArrayResult) mw.getResult(input);
if (result != null) {
ArrayUtilityMethods.printMatrix(inputMatrix);
System.out.println("");
ArrayUtilityMethods.printMatrix(result.data);
} else {
System.out.println("Please enter non-zero input");
LOGGER.info("Please enter non-zero input");
}
}

View File

@ -22,6 +22,9 @@
*/
package com.iluwatar.masterworker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Random;
/**
@ -29,7 +32,8 @@ import java.util.Random;
*/
public class ArrayUtilityMethods {
private static final Logger LOGGER = LoggerFactory.getLogger(ArrayUtilityMethods.class);
/**
* Method arraysSame compares 2 arrays @param a1 and @param a2
* and @return whether their values are equal (boolean).
@ -100,9 +104,9 @@ public class ArrayUtilityMethods {
//prints out int[][]
for (int i = 0; i < matrix.length; i++) {
for (int j = 0; j < matrix[0].length; j++) {
System.out.print(matrix[i][j] + " ");
LOGGER.info(matrix[i][j] + " ");
}
System.out.println("");
LOGGER.info("");
}
}