# Container logs interface via cli?

**URL:** <https://forums.balena.io/t/container-logs-interface-via-cli/4970>\
**Category:** Product support\
**Tags:** resin-cli\
**Created:** [January 13, 2019, 9:43pm UTC](https://forums.balena.io/t/container-logs-interface-via-cli/4970 "2019-01-13T21:43:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![r4space](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r4space](https://forums.balena.io/u/r4space)\
**Post date:** [January 13, 2019, 9:43pm UTC](https://forums.balena.io/t/container-logs-interface-via-cli/4970/1 "2019-01-13T21:43:50Z")

</div>

Hi

How can I access the logs output of a deployment attempt via the cli? Often I push and everything compiles fine so container deploys but something goes wrong in execution of my application. I can see what the problem is via the web interface logs screen but I was wondering if there’s a way to see this via the cli? //Usually I can’t ssh in as the container THEN fails)

Thanks

---

<div class="post-metadata">

**Author:** ![dash](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@dash](https://forums.balena.io/u/dash)\
**Post date:** [January 14, 2019, 12:18am UTC](https://forums.balena.io/t/container-logs-interface-via-cli/4970/4 "2019-01-14T00:18:01Z")

</div>

Hi @r4space,

Not sure what the official way is but I often SSH the host and then use:

```
$ balena logs {container name}

```

This is using the balena-engine which is managing the containers. All log command options are identical to docker logs command. I like this as it allows me to do more complex filtering/searching using grep etc.

Cheers  
Chris

---

<div class="post-metadata">

**Author:** ![cyplo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/cyplo/32/1224_2.png) [@cyplo](https://forums.balena.io/u/cyplo)\
**Post date:** [January 14, 2019, 8:52am UTC](https://forums.balena.io/t/container-logs-interface-via-cli/4970/6 "2019-01-14T08:52:29Z")

</div>

Thank you Chris for the response 🙂 This is as official as it gets, as it is provided by our official tool 🙂  
As for the build logs - you should be able to capture them from `balena push`/`git push` as well, so hopefully you should be able to have access to both build-time and -runtime logs combining the two methods. Let us know if this helps !

---

<div class="post-metadata">

**Author:** ![r4space](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r4space](https://forums.balena.io/u/r4space)\
**Post date:** [January 14, 2019, 7:47pm UTC](https://forums.balena.io/t/container-logs-interface-via-cli/4970/8 "2019-01-14T19:47:54Z")

</div>

Thanks both of you that’s exactly what I needed, works great! 🙂
