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