2 months ago
i have hobby plan
created a spring boot application that works using docker compose on my computer
im testing spacific endpoint , and get exception
after adding logs to the code , im not able to see the logs i have added .
for example
log.info("GET /api/symbol/");
or using System.out.format(template + "%n", args); deploy logs display logs that i didnt wrote
what am i missing ?
is there hidden window to view logs ? or should i write logs to a file ?
here the relevant variables
where are thie logs from stdout
here are the types of logs that i can use
2 Replies
Status changed to Open Railway • about 2 months ago
2 months ago
Two things to check here:
1. You're likely looking at the wrong log section
Railway separates Deploy Logs (build/start output) from Runtime Logs (your app's stdout while running). In the Railway dashboard, open your service and look for the "Logs" tab (not the deploy view). That's where your log.info and System.out output will appear.
2. Your log.info call is missing the arguments
// This won't substitute the {} placeholders — no args passed
log.info("GET /api/symbol/{} page={} size={} startDate={} endDate={}");
// Correct:
log.info("GET /api/symbol/{} page={} size={} startDate={} endDate={}", symbol, page, size, startDate, endDate);Without the arguments, SLF4J/Logback will log the literal string with {} unresolved, which can look like a blank or unexpected line.
3. Confirm logging goes to stdout
Railway captures stdout/stderr. Spring Boot logs to stdout by default, so no file configuration needed. If you've customized logback-spring.xml to write to a file only, switch it back to console appender.
2 months ago
Status changed to Solved guymalka • about 2 months ago