Skip to content

Commit 57d15ec

Browse files
FarrukhMasudFMasudMsftmhamilton723
authored
chore: Removing unnecessary logs (#2359)
* Reducing log size We are putting all request contents into logs, which just add unnecessary noise in the logs and we add the same message twice. I am ensuring that message is only added for debug. * Adding logDebug method * Fixing debug --------- Co-authored-by: Farrukh Masud <[email protected]> Co-authored-by: Mark Hamilton <[email protected]>
1 parent 6c9c9ce commit 57d15ec

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/HTTPClients.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ object HandlingUtils extends SparkLogging {
152152
case r: HttpPost => Try(IOUtils.toString(r.getEntity.getContent, "UTF-8")).getOrElse("")
153153
case r => r.getURI
154154
}
155-
SynapseMLLogging.logMessage(s"sending $message")
155+
SynapseMLLogging.logDebug(s"sending $message")
156156
val start = System.currentTimeMillis()
157157
val resp = sendWithRetries(client, req, retryTimes.toArray)
158-
SynapseMLLogging.logMessage(s"finished sending (${System.currentTimeMillis() - start}ms) $message")
158+
SynapseMLLogging.logMessage(
159+
s"finished sending to ${req.getURI} took (${System.currentTimeMillis() - start}ms)")
159160
val respData = convertAndClose(resp)
160161
req.releaseConnection()
161162
respData

core/src/main/scala/com/microsoft/azure/synapse/ml/logging/SynapseMLLogging.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ object SynapseMLLogging extends Logging {
8888
logInfo(SASScrubber.scrub(message))
8989
}
9090

91+
override def logDebug(msg: => String): Unit = super.logDebug(SASScrubber.scrub(msg))
9192
}
9293

9394
trait SynapseMLLogging extends Logging {

0 commit comments

Comments
 (0)