Skip to content

Commit f6b6b1d

Browse files
committed
Only apply globs to the context part of Kore log messages
1 parent 0144916 commit f6b6b1d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

booster/tools/booster/Server.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ import Kore.Log.DebugSolver qualified as Log
8888
import Kore.Log.Registry qualified as Log
8989
import Kore.Rewrite.SMT.Lemma (declareSMTLemmas)
9090
import Kore.Syntax.Definition (ModuleName (ModuleName), SentenceAxiom)
91+
import Kore.Util (extractLogMessageContext)
9192
import Options.SMT as KoreSMT (KoreSolverOptions (..), Solver (..))
9293
import Prettyprinter qualified as Pretty
9394
import Proxy (KoreServer (..), ProxyConfig (..))
@@ -165,9 +166,10 @@ main = do
165166
OneLine ->
166167
if contexLoggingEnabled
167168
then \txt ->
168-
-- FIXME: likely terrible performance! Use something that does not unpack Text
169-
not (any (flip Glob.match (Text.unpack txt)) negGlobPatterns)
170-
&& any (flip Glob.match (Text.unpack txt)) globPatterns
169+
let contextStr = Text.unpack $ extractLogMessageContext txt
170+
in -- FIXME: likely terrible performance! Use something that does not unpack Text
171+
not (any (flip Glob.match contextStr) negGlobPatterns)
172+
&& any (flip Glob.match contextStr) globPatterns
171173
else const True
172174
_ -> const True
173175

0 commit comments

Comments
 (0)