File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
services/src/main/kotlin/spp/probe/services/common Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,6 @@ object ContextReceiver {
114
114
115
115
@JvmStatic
116
116
fun putLog (logId : String? , logFormat : String? , vararg logArguments : String ) = executor.submit {
117
- val localVars: Map <String , Any ?>? = localVariables.remove(logId)
118
- val localFields: Map <String , Any ?>? = fields.remove(logId)
119
- val localStaticFields: Map <String , Any ?>? = staticFields.remove(logId)
120
117
val logTags = LogTags .newBuilder()
121
118
.addData(
122
119
KeyStringValuePair .newBuilder()
@@ -133,11 +130,11 @@ object ContextReceiver {
133
130
if (logArguments.isNotEmpty()) {
134
131
for (i in logArguments.indices) {
135
132
// todo: is it smarter to pass localVariables[arg]?
136
- var argValue = localVars ?.get(logArguments[i])
133
+ var argValue = localVariables.remove(logId) ?.get(logArguments[i])?.second
137
134
if (argValue == null ) {
138
- argValue = localFields ?.get(logArguments[i])
135
+ argValue = fields.remove(logId) ?.get(logArguments[i])?.second
139
136
if (argValue == null ) {
140
- argValue = localStaticFields ?.get(logArguments[i])
137
+ argValue = staticFields.remove(logId) ?.get(logArguments[i])?.second
141
138
}
142
139
}
143
140
val value = Optional .ofNullable(argValue).orElse(" null" )
You can’t perform that action at this time.
0 commit comments