HTTP Body not shown in logs in railway
poui
HOBBYOP

a year ago

The body appears normally in my IDE but it doesn't appear in the logs of Railway.
I am using ktor as the http client and implemented all the dependencies for logging.
implementation("io.ktor:ktor-client-logging:$ktorversion") implementation("ch.qos.logback:logback-classic:$logbackversion")

11 Replies

poui
HOBBYOP

a year ago

d4c27e63-1666-4337-988d-6f7250261d1c


poui
HOBBYOP

a year ago

Example of a response with a body but it doesn't show anything
and the body transformed into a variable print just after

1309105744297328600


a year ago

I would recommend looking into the difference in how it's printed, and then reconciling the differences


poui
HOBBYOP

a year ago

The second one is just a println(variableName)
The logger works when it's a content-type :plain/text but not with any other type
I can't reproduce it in my IDE :/


a year ago

it's also method GET, so why would there be a body?


poui
HOBBYOP

a year ago

I asked for all the project that has an id higher than 4852 and the response of that request is in the body


a year ago

right, but thats a GET request, not a POST request


poui
HOBBYOP

a year ago

i don't see how that's relevant, a get request can have a body for the response


a year ago

i was under the impression that you are logging request bodies


a year ago

either way, theres not much i can do to help as this isnt a platform issue


poui
HOBBYOP

a year ago

yes, I am logging the body of all the request, it makes debugging easier but It's always empty when the content type is json.
I don't have that issue in my IDE that's why I thought it might be a platform issue


Loading...