Skip to content

Commit

Permalink
Upgrade to log4j 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bravo27 committed Jul 17, 2020
1 parent 238b36c commit a5877ec
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
## Eclipse
#################

target/
*.pydevproject
.project
.metadata
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ The `adapters.xml` file for the Stock-List Demo, should look like:
<!-- Optional for StockQuotesDataAdapter.
Configuration file for the Adapter's own logging.
Logging is managed through log4j. -->
<param name="log_config">adapters_log_conf.xml</param>
<param name="log_config_refresh_seconds">10</param>

</data_provider>
Expand Down
9 changes: 4 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@
<version>7.3.0</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>

<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.13.3</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.log4j.Logger;
import org.apache.log4j.xml.DOMConfigurator;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import stocklist_demo.feed_simulator.ExternalFeedListener;
import stocklist_demo.feed_simulator.ExternalFeedSimulator;
Expand Down Expand Up @@ -102,6 +102,7 @@ public StockQuotesDataAdapter() {
* feed, for a real feed).
*/
public void init(Map params, File configDir) {
/*
String logConfig = (String) params.get("log_config");
if (logConfig != null) {
File logConfigFile = new File(configDir, logConfig);
Expand All @@ -111,8 +112,8 @@ public void init(Map params, File configDir) {
} else {
DOMConfigurator.configure(logConfigFile.getAbsolutePath());
}
}
logger = Logger.getLogger("LS_demos_Logger.StockQuotes");
}*/
logger = LogManager.getLogger("LS_demos_Logger.StockQuotes");

//The feedMap of this adapter is never used
// Read the Adapter Set name, which is supplied by the Server as a parameter
Expand Down

0 comments on commit a5877ec

Please sign in to comment.