Improve abra app logs output by adding some docker service logs options #270

Closed
opened 2021-11-26 09:35:14 +00:00 by 3wordchant · 0 comments
Owner

Describe the problem to be solved

$ abra app logs tv.lumbung.space
�2021-11-26T09:32:26.894232000Z COM_DOCKER_SWARM_SERVICE_NAME=tv_lumbung_space_app,IMAGE_NAME=chocobozzz%2Fpeertube%3Av3.4.1-buster%40sha256%3A59bb6d39311474a91f6ea2971c887a56c05274148cab08a48b111ea30dadea9a,com.docker.swarm.node.id=et5llv92plgnxan0p1q3lf0xc,com.docker.swarm.service.id=lhiro9cksoynm7ayxlim7amxt,com.docker.swarm.task.id=z31ftjy2vtupovrigis99vkje [tv.lumbung.space:443] 2021-11-26 09:32:26.893 info: 127.0.0.1 - - [26/Nov/2021:09:32:26 +0000] "GET /api/v1/ping HTTP/1.1" 200 4 "-" "-"
Z2021-11-26T09:32:38.551098000Z COM_DOCKER_SWARM_SERVICE_NAME=tv_lumbung_space_app,IMAGE_NAME=chocobozzz%2Fpeertube%3Av3.4.1-buster%40sha256%3A59bb6d39311474a91f6ea2971c887a56c05274148cab08a48b111ea30dadea9a,com.docker.swarm.node.id=et5llv92plgnxan0p1q3lf0xc,com.docker.swarm.service.id=lhiro9cksoynm7ayxlim7amxt,com.docker.swarm.task.id=z31ftjy2vtupovrigis99vkje [tv.lumbung.space:443] 2021-11-26 09:32:38.550 info: 216.245.221.93 - - [26/Nov/2021:09:32:38 +0000] "HEAD / HTTP/1.0" 200 10861 "https://tv.lumbung.space" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)"

Where each line is approximately 1,000,000 characters long.

Describe the solution you would like

$ DOCKER_CONTEXT=lumbung.space docker service logs --no-task-ids --no-trunc --raw tv_lumbung_space_app -f
[tv.lumbung.space:443] 2021-11-26 09:32:26.893 info: 127.0.0.1 - - [26/Nov/2021:09:32:26 +0000] "GET /api/v1/ping HTTP/1.1" 200 4 "-" "-"
[tv.lumbung.space:443] 2021-11-26 09:32:38.550 info: 216.245.221.93 - - [26/Nov/2021:09:32:38 +0000] "HEAD / HTTP/1.0" 200 10861 "https://tv.lumbung.space" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)"
[tv.lumbung.space:443] 2021-11-26 09:33:27.030 info: 127.0.0.1 - - [26/Nov/2021:09:33:27 +0000] "GET /api/v1/ping HTTP/1.1" 200 4 "-" "-"
[tv.lumbung.space:443] 2021-11-26 09:33:38.561 info: 216.245.221.93 - - [26/Nov/2021:09:33:38 +0000] "HEAD / HTTP/1.0" 200 10861 "https://tv.lumbung.space" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)"

Where each line is pretty similar to what's directly output by the service itself (including some neat colour coding that's not visible here).

So basically adding --no-task-ids --no-trunc --raw to our options for the underlying logs call?

## Describe the problem to be solved ``` $ abra app logs tv.lumbung.space �2021-11-26T09:32:26.894232000Z COM_DOCKER_SWARM_SERVICE_NAME=tv_lumbung_space_app,IMAGE_NAME=chocobozzz%2Fpeertube%3Av3.4.1-buster%40sha256%3A59bb6d39311474a91f6ea2971c887a56c05274148cab08a48b111ea30dadea9a,com.docker.swarm.node.id=et5llv92plgnxan0p1q3lf0xc,com.docker.swarm.service.id=lhiro9cksoynm7ayxlim7amxt,com.docker.swarm.task.id=z31ftjy2vtupovrigis99vkje [tv.lumbung.space:443] 2021-11-26 09:32:26.893 info: 127.0.0.1 - - [26/Nov/2021:09:32:26 +0000] "GET /api/v1/ping HTTP/1.1" 200 4 "-" "-" Z2021-11-26T09:32:38.551098000Z COM_DOCKER_SWARM_SERVICE_NAME=tv_lumbung_space_app,IMAGE_NAME=chocobozzz%2Fpeertube%3Av3.4.1-buster%40sha256%3A59bb6d39311474a91f6ea2971c887a56c05274148cab08a48b111ea30dadea9a,com.docker.swarm.node.id=et5llv92plgnxan0p1q3lf0xc,com.docker.swarm.service.id=lhiro9cksoynm7ayxlim7amxt,com.docker.swarm.task.id=z31ftjy2vtupovrigis99vkje [tv.lumbung.space:443] 2021-11-26 09:32:38.550 info: 216.245.221.93 - - [26/Nov/2021:09:32:38 +0000] "HEAD / HTTP/1.0" 200 10861 "https://tv.lumbung.space" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)" ``` Where each line is approximately 1,000,000 characters long. ## Describe the solution you would like ``` $ DOCKER_CONTEXT=lumbung.space docker service logs --no-task-ids --no-trunc --raw tv_lumbung_space_app -f [tv.lumbung.space:443] 2021-11-26 09:32:26.893 info: 127.0.0.1 - - [26/Nov/2021:09:32:26 +0000] "GET /api/v1/ping HTTP/1.1" 200 4 "-" "-" [tv.lumbung.space:443] 2021-11-26 09:32:38.550 info: 216.245.221.93 - - [26/Nov/2021:09:32:38 +0000] "HEAD / HTTP/1.0" 200 10861 "https://tv.lumbung.space" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)" [tv.lumbung.space:443] 2021-11-26 09:33:27.030 info: 127.0.0.1 - - [26/Nov/2021:09:33:27 +0000] "GET /api/v1/ping HTTP/1.1" 200 4 "-" "-" [tv.lumbung.space:443] 2021-11-26 09:33:38.561 info: 216.245.221.93 - - [26/Nov/2021:09:33:38 +0000] "HEAD / HTTP/1.0" 200 10861 "https://tv.lumbung.space" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)" ``` Where each line is pretty similar to what's directly output by the service itself (including some neat colour coding that's not visible here). So basically adding `--no-task-ids --no-trunc --raw` to our options for the underlying `logs` call?
3wordchant added the
enhancement
abra
labels 2021-11-26 09:35:14 +00:00
decentral1se added this to the Beta release (software) project 2021-11-26 19:56:07 +00:00
decentral1se added this to the UI / UX testing milestone 2021-11-26 19:56:29 +00:00
decentral1se referenced this issue from a commit 2021-11-26 21:15:10 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#270
No description provided.