Drone log view gives an invalid syntax error

Hello,

When I do drone log view repo/project it produce strconv.Atoi: parsing "": invalid syntax. I did a drone log purge but it does the same. It’s the same for other repos.

1 Like

this indicates you are missing required build, stage or step number arguments, or that you have provided an argument that is not a number.

$ drone log view --help
NAME:
   drone log view - display the step logs

USAGE:
   drone log view <repo/name> <build> <stage> <step>

If you continue to experience issues you can analyze the code at https://github.com/drone/drone-cli/blob/master/drone/log/log_view.go

Thanks, my bad. I didn’t read the help enough.

I suppose the log message can be improved to say than some arguments are missing.

I struggled with this command as well.

Here is a valid syntax:
drone log view octocat/hello-world 271 1 1

  • build, stage and step are integer IDs.
  • build number, you can find with drone build ls octocat/hello-world
  • stage and step start at 1 and you have to count from your .drone.yaml file (if you know a way to find it from drone-cli I’m interested).
1 Like