HTTP Body not shown in logs in railway
poui
PROOP

2 years 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:$ktor_version")

implementation("ch.qos.logback:logback-classic:$logback_version")

Closed

11 Replies

poui
PROOP

2 years ago

d4c27e63-1666-4337-988d-6f7250261d1c


poui
PROOP

2 years ago

Example of a response with a body but it doesn't show anything

and the body transformed into a variable print just after

1309105744297328690


2 years ago

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


poui
PROOP

2 years 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 :/


2 years ago

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


poui
PROOP

2 years ago

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


2 years ago

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


poui
PROOP

2 years ago

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


2 years ago

i was under the impression that you are logging request bodies


2 years ago

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


poui
PROOP

2 years 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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...