Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Updated ERROR logging and if else logic condition in spark4jexample.
Browse files Browse the repository at this point in the history
  • Loading branch information
sudharshana-cfa committed Sep 12, 2018
1 parent b9ba4ab commit 3945b86
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -60,9 +60,9 @@ object SparkLog4jExample {

testRdd.foreach { num =>
LoggingConfiguration.init // initialized once on first record, value is thrown away an nothing done for other records
if (num % 1000 == 0) {
if (num % 10000 == 0) {
log.error(s"XXXXX error! num: " + num)
} else if (num % 100 == 0) {
} else if (num % 5000 == 0) {
log.warn(s"XXXXX warning! num: " + num)
} else {
log.info(s"XXXXX found: " + num)
Expand Down

0 comments on commit 3945b86

Please sign in to comment.