Commit 02b049bc authored by 赵威's avatar 赵威

comment logger

parent a87ca6a2
...@@ -27,8 +27,8 @@ lazy val root = (project in file(".")) ...@@ -27,8 +27,8 @@ lazy val root = (project in file("."))
.settings( .settings(
name := "streamingUserPortrait", name := "streamingUserPortrait",
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3", // libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3",
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2", // libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
libraryDependencies += "com.alibaba" % "fastjson" % "1.2.75", libraryDependencies += "com.alibaba" % "fastjson" % "1.2.75",
libraryDependencies += jsonNative, libraryDependencies += jsonNative,
......
...@@ -34,7 +34,8 @@ object Main extends LazyLogging { ...@@ -34,7 +34,8 @@ object Main extends LazyLogging {
// val query = ES.generateServiceDiaryRequest(List("光子嫩肤", "水光针"), List("丰胸", "胸部塑身"), -1) // val query = ES.generateServiceDiaryRequest(List("光子嫩肤", "水光针"), List("丰胸", "胸部塑身"), -1)
// println("###############") // println("###############")
try { try {
logger.info("UserPortrait Flink Started") // TODO logger
// logger.info("UserPortrait Flink Started")
val env = StreamExecutionEnvironment.getExecutionEnvironment val env = StreamExecutionEnvironment.getExecutionEnvironment
// TODO read from config // TODO read from config
...@@ -108,7 +109,8 @@ object Main extends LazyLogging { ...@@ -108,7 +109,8 @@ object Main extends LazyLogging {
Redis.save(ES.request(serviceDiaryReq), deviceId, "service_diary", streamTimeBegin) Redis.save(ES.request(serviceDiaryReq), deviceId, "service_diary", streamTimeBegin)
// current time // current time
logger.info(s"${user.eventCn} ${deviceId}") // TODO logger
// logger.info(s"${user.eventCn} ${deviceId}")
val cost = streamTimeBegin - user.sendTimestamp val cost = streamTimeBegin - user.sendTimestamp
if (cost > 1000) { if (cost > 1000) {
...@@ -136,7 +138,8 @@ object Main extends LazyLogging { ...@@ -136,7 +138,8 @@ object Main extends LazyLogging {
Map("Main.main" -> "stream.map", "error" -> e.getStackTrace.mkString("\n")), Map("Main.main" -> "stream.map", "error" -> e.getStackTrace.mkString("\n")),
contentType = "exception" contentType = "exception"
) )
logger.error(e.getStackTrace.mkString("\n")) // TODO logger
// logger.error(e.getStackTrace.mkString("\n"))
e.printStackTrace() e.printStackTrace()
"" ""
} }
...@@ -151,7 +154,8 @@ object Main extends LazyLogging { ...@@ -151,7 +154,8 @@ object Main extends LazyLogging {
Map("method" -> "main", "error" -> e.getStackTrace.mkString("\n")), Map("method" -> "main", "error" -> e.getStackTrace.mkString("\n")),
contentType = "exception" contentType = "exception"
) )
logger.error(e.getStackTrace.mkString("\n")) // TODO logger
// logger.error(e.getStackTrace.mkString("\n"))
e.printStackTrace() e.printStackTrace()
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment