# ktor

Martin Gaens

04/09/2022, 8:28 PM
Hello, is there a way to disable the logs from Thymeleaf? There's way too much information coming into my logs from Thymeleaf anytime a HTML response is being rendered. Here's an example of the stuff I'd like to get rid of:
Copy code
2022-04-09 23:21:46.270 [eventLoopGroupProxy-4-1] TRACE o.t.s.expression.AdditionExpression - [THYMELEAF][eventLoopGroupProxy-4-1] Evaluating addition expression: "'table-select-' + ${iter.index}"
2022-04-09 23:21:46.270 [eventLoopGroupProxy-4-1] TRACE o.t.s.e.TextLiteralExpression - [THYMELEAF][eventLoopGroupProxy-4-1] Evaluating text literal: "'table-select-'"
2022-04-09 23:21:46.270 [eventLoopGroupProxy-4-1] TRACE o.t.s.expression.VariableExpression - [THYMELEAF][eventLoopGroupProxy-4-1] Evaluating variable expression: "${iter.index}"
2022-04-09 23:21:46.270 [eventLoopGroupProxy-4-1] TRACE o.t.s.e.OGNLVariableExpressionEvaluator - [THYMELEAF][eventLoopGroupProxy-4-1] OGNL expression: evaluating expression "iter.index" on target
2022-04-09 23:21:46.270 [eventLoopGroupProxy-4-1] TRACE o.t.T.cache.EXPRESSION_CACHE - [THYMELEAF][eventLoopGroupProxy-4-1][EXPRESSION_CACHE][CACHE_HIT] Cache hit in cache "EXPRESSION_CACHE" for key "ognlsc|org.thymeleaf.engine.IterationStatusVar|index".

Job Curtis

04/09/2022, 9:22 PM
Yes, you can change the logging level for a specific package in most logging frameworks. For example, if you're using logback, you can add (something like) this line to your logback.xml;
Copy code
<logger name="org.thymeleaf" level="info" />

Martin Gaens

04/09/2022, 11:30 PM
Awesome, worked! Thank you very much.