https://kotlinlang.org logo
#ktor
Title
# ktor
c

Chris Miller

10/06/2023, 7:41 AM
I want to modify the existing
CallLogging
by adding additional text (IP address, user agent etc) to the end of the default
CallLoggingConfig.defaultFormat()
log message. It seems like I can only create my own log message from scratch though because I can't access the default `formatCall`value, only overwrite it. Is my only option to cut'n'paste most of the default code (including color handling logic etc)? It also seems a bit odd there's a public
disableDefaultColors()
method that is only relevant for the default formatter, and as soon as you provide a custom formatter then there's no support for colors other than to roll your own? Feels like this could be improved, e.g. by making
colored()
accessible to custom formatters?
a

Aleksei Tirman [JB]

10/06/2023, 8:07 AM
Unfortunately, copying and pasting is the only option. Can you please file an issue about the extension point?
c

Chris Miller

10/08/2023, 1:37 PM