Would it be possible to access the entire client l...
# ktor
c
Would it be possible to access the entire client log for a request as a String? I'm interested in storing it to a file as a regression test (if the file changes, there may be an API breaking change). The full logs as printed by the clients already have all the needed information, but I don't know how to get the logs for a specific request as a String.
a
Do you mean the logs which are written by the
Logging
plugin?
c
Yes
a
The best you can do is implementing the
Logger
interface to separate logs for individual requests. For example, by detecting the
BODY END
string.
c
Is it guaranteed that they are never intermingled?
a
Unfortunately, it’s not.