Skip to content

Commit

Permalink
[paypal#247] [spark] Bump Spark Version to 2.4.7 | Trim Logging Module
Browse files Browse the repository at this point in the history
  • Loading branch information
Dee-Pac committed Oct 30, 2020
1 parent a0bcd9e commit bf48928
Show file tree
Hide file tree
Showing 25 changed files with 12 additions and 3,569 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import java.util.Calendar
import scala.collection.JavaConverters._

import com.paypal.gimel.logger.conf.LoggerConstants
import com.paypal.gimel.logging.impl.JSONSystemLogger

/**
* com.paypal.gimel.logger.Logger SingleTon
Expand Down Expand Up @@ -74,7 +73,6 @@ class Logger(config: Any) extends Serializable {
private val _APP_reference = config.toString
private val logModes = Map(4 -> "INFO", 3 -> "DEBUG", 2 -> "WARN", 1 -> "ERROR")
@volatile private var logMode = 4
lazy val logger: JSONSystemLogger = JSONSystemLogger.getInstance(getClass)
private var logAudit = false
var consolePrintEnabled = false
// logic to attempt logging
Expand Down Expand Up @@ -136,7 +134,6 @@ class Logger(config: Any) extends Serializable {
case _ =>
if (!sendToKafka) s"[${_APP_reference}] : ${message.toString}" else message
}
if (logMode >= 2 && auditingAndAlertingEnabled) logger.debug(finalMessage.asInstanceOf[Object])
if (consolePrintEnabled) println(s"GIMEL-LOGGER | ${Calendar.getInstance().getTime} | ${message}")
} catch {
case ex: Throwable =>
Expand All @@ -158,7 +155,6 @@ class Logger(config: Any) extends Serializable {
case _ =>
if (!sendToKafka) s"[${_APP_reference}] : ${message.toString}" else message
}
if (logMode >= 4 && auditingAndAlertingEnabled) logger.info(finalMessage.asInstanceOf[Object])
if (consolePrintEnabled) println(s"GIMEL-LOGGER | ${Calendar.getInstance().getTime} | ${message}")
} catch {
case ex: Throwable =>
Expand All @@ -180,7 +176,6 @@ class Logger(config: Any) extends Serializable {
case _ =>
if (!sendToKafka) s"[${_APP_reference}] : ${message.toString}" else message
}
if (logMode >= 3 && auditingAndAlertingEnabled) logger.warn(finalMessage.asInstanceOf[Object])
if (consolePrintEnabled) println(s"GIMEL-LOGGER | ${Calendar.getInstance().getTime} | ${message}")
} catch {
case ex: Throwable =>
Expand All @@ -201,7 +196,6 @@ class Logger(config: Any) extends Serializable {
case _ =>
s"[${_APP_reference}] : ${message.toString}"
}
if (logMode >= 1 && auditingAndAlertingEnabled) logger.error(finalMessage)
if (consolePrintEnabled) println(s"GIMEL-LOGGER | ${Calendar.getInstance().getTime} | ${message}")
} catch {
case ex: Throwable =>
Expand Down Expand Up @@ -268,7 +262,6 @@ class Logger(config: Any) extends Serializable {
if (logAudit) {
this.info("Auditing Information being posted to Gimel Audit Log...")
this.info(accessAuditInfo)
logger.info(accessAuditInfo.asJava)
}
accessAuditInfo
}
Expand Down Expand Up @@ -346,7 +339,6 @@ class Logger(config: Any) extends Serializable {
if (logAudit) {
this.info("Auditing Information being posted to Gimel Audit Log...")
this.info(accessAuditInfo)
logger.info(accessAuditInfo.asJava)
}

this.logMethodAccess(yarnAppId
Expand Down
62 changes: 0 additions & 62 deletions gimel-logging/gimel-logging_2.2/pom.xml

This file was deleted.

Loading

0 comments on commit bf48928

Please sign in to comment.