File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,14 @@ This file is divided into 3 sections:
155155 <customMessage ><![CDATA[ MDC should be used in string interpolation log"..." instead of s"..."]]> </customMessage >
156156 </check >
157157
158+ <check customId =" logInlineVariable" level =" error" class =" org.scalastyle.file.RegexChecker" enabled =" true" >
159+ <parameters ><parameter name =" regex" >log(?:Info|Warning|Error)\(s".*(\$|\+\s*[^\s"]).*"\)</parameter ></parameters >
160+ <customMessage >
161+ Logging message should use log"..." instead of s"..." and variables should be wrapped in `MDC`s.
162+ Refer to Structured Logging Framework guidelines in the file `internal/Logging.scala`.
163+ </customMessage >
164+ </check >
165+
158166 <check customId =" hadoopconfiguration" level =" error" class =" org.scalastyle.file.RegexChecker" enabled =" true" >
159167 <parameters ><parameter name =" regex" >spark(.sqlContext)?.sparkContext.hadoopConfiguration</parameter ></parameters >
160168 <customMessage ><![CDATA[
You can’t perform that action at this time.
0 commit comments