Logs
wolfedale
FREEOP

9 months ago

Somehow I don't see any (almost) logs from my application written in Go. I have no clue why and I found nothing at the doc. Maybe I'm missing something? I see only first log from my main() function:

func main() {
	log.SetOutput(os.Stdout)
	log.SetFlags(log.LstdFlags | log.Lshortfile)

	log.Println("🚀 Starting backend server...")

but the rest part of the code (even if the code works correctly) I see zero logs. I'm using standard log.Println() or log.Printf().

Can you please suggest me the solution?

Thanks!

$10 Bounty

1 Replies

1topby
HOBBY

9 months ago

Hey, wolfedale. The error is that you set log.SetOutput(os.Stdout), but Railway typically only captures logs sent to stderr (the default for Go's log package). Remove log.SetOutput(os.Stdout) so logs go to stderr, and they should appear correctly in your logs dashboard.


Loading...