{"id":19029786,"url":"https://github.com/ahmetb/dlog","last_synced_at":"2025-05-06T18:07:58.370Z","repository":{"id":57495222,"uuid":"77982131","full_name":"ahmetb/dlog","owner":"ahmetb","description":"Go library to parse the Docker Logs stream","archived":false,"fork":false,"pushed_at":"2017-01-05T20:53:56.000Z","size":20,"stargazers_count":37,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T18:07:38.595Z","etag":null,"topics":["docker","go","log-collector","log-stream"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmetb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-04T05:02:04.000Z","updated_at":"2025-02-04T04:55:00.000Z","dependencies_parsed_at":"2022-08-31T12:52:00.809Z","dependency_job_id":null,"html_url":"https://github.com/ahmetb/dlog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetb%2Fdlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetb%2Fdlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetb%2Fdlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetb%2Fdlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmetb","download_url":"https://codeload.github.com/ahmetb/dlog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252741370,"owners_count":21797027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","go","log-collector","log-stream"],"created_at":"2024-11-08T21:15:19.191Z","updated_at":"2025-05-06T18:07:58.345Z","avatar_url":"https://github.com/ahmetb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dlog\n\nGo library to parse the binary Docker Logs stream into plain text.\n\n[![GoDoc](https://godoc.org/github.com/ahmetalpbalkan/dlog?status.svg)](https://godoc.org/github.com/ahmetalpbalkan/dlog)\n[![Build Status](https://travis-ci.org/ahmetalpbalkan/dlog.svg?branch=master)](https://travis-ci.org/ahmetalpbalkan/dlog)\n[![Coverage Status](https://coveralls.io/repos/github/ahmetalpbalkan/dlog/badge.svg?branch=master)](https://coveralls.io/github/ahmetalpbalkan/dlog?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ahmetalpbalkan/dlog)](https://goreportcard.com/report/github.com/ahmetalpbalkan/dlog)\n\n`dlog` offers a single method: `NewReader(r io.Reader) io.Reader`. You are\nsupposed to give the response body of the `/containers/\u003cid\u003e/logs`. The returned\nreader strips off the log headers and just gives the plain text to be used.\n\nHere is how a log line from container looks like in the  the raw docker logs\nstream:\n\n```text\n01 00 00 00 00 00 00 1f 52 6f 73 65 73 20 61 72  65 ...\n│  ─────┬── ─────┬─────  R  o  s  e  s     a  r   e ...\n│       │        │\n└stdout │        │\n        │        └─ 0x0000001f = log message is 31 bytes\n      unused\n```\n\nYou can get the logs stream from [go-dockerclient][gocl]'s [`Logs()`][gocl-logs]\nmethod, or by calling the [container logs endpoint][rapi] direclty via the UNIX socket\ndirectly.\n\nSee [`example_test.go`](./example_test.go) for an example usage.\n\nThis library is written in vanilla Go and has no external dependencies.\n\n[gocl]: https://github.com/fsouza/go-dockerclient\n[gocl-logs]: https://godoc.org/github.com/fsouza/go-dockerclient#Client.Logs\n[rapi]: https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/get-container-logs\n\n-----\n\nLicensed under Apache 2.0. Copyright 2017 [Ahmet Alp Balkan][ab].\n\n[ab]: https://ahmetalpbalkan.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetb%2Fdlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetb%2Fdlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetb%2Fdlog/lists"}