Why is my release log empty in Heroku even though I run echo?

Viewed 388

This is my working heroku.yml file:

build:
  docker:
    web: Dockerfile
release:
  image: web
  command:
    - echo I want to see if this actually works and appears in the logs

When I check the release logs in the website, or even via cli with Heroku releases:output -a [my-app] v18 it shows nothing

Is there a way that we can actually see something? It's really hard to debug what's going on and whether my script is running or not if I can't even see the release log. I can still see the build log as usual, just not the release log

2 Answers

I had the same problem. In my case, the cause was that curl was not installed in my Docker image. I found the following log by heroku logs -t:

app[release.6892]: /bin/sh: curl: not found

It seems Heroku uses curl to send logs. Installing curl fixed the problem.

This happens with containers without curl as explained by @Ryu.

As a workaround you can see the release logs in the normal app logs.

Related