{"id":43832800,"url":"https://github.com/flow-lab/dlog","last_synced_at":"2026-02-06T03:33:20.179Z","repository":{"id":57496727,"uuid":"129158140","full_name":"flow-lab/dlog","owner":"flow-lab","description":"Efficient and Reliable Go Logging (JSON or TXT)","archived":false,"fork":false,"pushed_at":"2023-03-28T07:20:19.000Z","size":57,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-08-20T23:53:47.481Z","etag":null,"topics":["datadog","gcp","go","golang","kubernetes","logging"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flow-lab.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":"2018-04-11T21:48:39.000Z","updated_at":"2023-03-21T07:43:25.000Z","dependencies_parsed_at":"2023-02-09T02:45:57.288Z","dependency_job_id":null,"html_url":"https://github.com/flow-lab/dlog","commit_stats":null,"previous_names":[],"tags_count":13,"template":null,"template_full_name":null,"purl":"pkg:github/flow-lab/dlog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-lab%2Fdlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-lab%2Fdlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-lab%2Fdlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-lab%2Fdlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flow-lab","download_url":"https://codeload.github.com/flow-lab/dlog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-lab%2Fdlog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29148247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["datadog","gcp","go","golang","kubernetes","logging"],"created_at":"2026-02-06T03:33:19.677Z","updated_at":"2026-02-06T03:33:20.171Z","avatar_url":"https://github.com/flow-lab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## dlog - Go logger ![Go](https://github.com/flow-lab/dlog/workflows/Go/badge.svg) [![codecov](https://codecov.io/gh/flow-lab/dlog/branch/master/graph/badge.svg)](https://codecov.io/gh/flow-lab/dlog) [![Go Report Card](https://goreportcard.com/badge/github.com/flow-lab/dlog)](https://goreportcard.com/report/github.com/flow-lab/dlog)\n\nThe _dlog_ package provides a logging framework for Go that formats logs in JSON format, optimised for use with Google\nKubernetes, AWS EKS etc. Logs can be easily pushed to Datadog, Google Stackdriver and AWS CloudWatch.\n\nThis package provides a simple and efficient way to format logs in a structured way that can be easily parsed by log\naggregators and monitoring tools, while still being human-readable. The JSON format also allows for easy searching and\nfiltering of logs, making it ideal for managing large-scale deployments.\n\nIn addition to the standard logging features, _dlog_ provides additional features like tagging logs with metadata and\nfiltering logs based on log levels. The package is highly customisable and easily integrated into any Go project.\n\nBuild on top of [Logrus](https://github.com/sirupsen/logrus). Log format matches json\nformat of [Datadog](https://docs.datadoghq.com/logs/).\n\n## Installation\n\n```shell\ngo get github.com/flow-lab/dlog\n```\n\n## Usage\n\n### Basic Usage with JSON formatter\n\nThis format is used by default. It is optimised for use with Datadog, Google Stackdriver and AWS CloudWatch.\n\n```go\nimport (\n...\n  log \"github.com/sirupsen/logrus\"\n  \"github.com/flow-lab/dlog\"\n)\n\n...\n\nlogger := dlog.NewLogger(\u0026dlog.Config{\n  AppName:      \"myservice\",\n  Level:        \"debug\",\n  Version:      \"0.1.0\",\n  Commit:       \"1234567\",\n  Build:        \"2020-01-01T00:00:00Z\",\n  ReportCaller: true,\n})\n\nlogger.Info(\"Hello world\")\n{\"appname\":\"myservice\",\"build\":\"2020-01-01T00:00:00Z\",\"commit\":\"1234567\",\"file\":\"/Users/test/dlog/main_test.go:82\",\"func\":\"github.com/flow-lab/dlog.TestContextLogger.func2\",\"level\":\"info\",\"message\":\"Hello World\",\"timestamp\":\"2023-01-09T16:17:36+01:00\",\"version\":\"0.1.0\"}\n\nlogger := logger.WithField(\"component\", \"myprocessor\")\nlogger.Info(\"Hello world\")\n{\"appname\":\"myservice\",\"component\":\"myprocessor\",\"build\":\"2020-01-01T00:00:00Z\",\"commit\":\"1234567\",\"file\":\"/Users/test/dlog/main_test.go:82\",\"func\":\"github.com/flow-lab/dlog.TestContextLogger.func2\",\"level\":\"info\",\"message\":\"Hello World\",\"timestamp\":\"2023-01-09T16:17:36+01:00\",\"version\":\"0.1.0\"}\n```\n\n\n## Basic Usage with Text formatter\n\nThis format is used for local development.\n\n```go\nimport (\n...\n  log \"github.com/sirupsen/logrus\"\n  \"github.com/flow-lab/dlog\"\n)\n\n...\n\nlogger := dlog.NewLogger(\u0026dlog.Config{\n  AppName:      \"myservice\",\n  Level:        \"debug\",\n  Version:      \"0.1.0\",\n  Commit:       \"1234567\",\n  Build:        \"2020-01-01T00:00:00Z\",\n  ReportCaller: false,\n  Formatter:    \"text\", // for local development\n})\n\nlogger.Info(\"Hello World\")\nlogger.Debug(\"Hello World\")\nlogger.Warn(\"Hello World\")\nlogger.Error(\"Hello World\")\n\nINFO   [2023-03-12 23:04:11.377Z] Hello World\nDEBUG  [2023-03-12 23:04:11.378Z] Hello World\nWARNING[2023-03-12 23:04:11.378Z] Hello World\nERROR  [2023-03-12 23:04:11.378Z] Hello World\n```\n\n## Contributing\n\nContributions are welcome! If you find a bug or have a feature request, please open an issue on GitHub. If you want to\ncontribute code, please open a pull request.\n\nLicense\n-------\n[![License: MIT](https://img.shields.io/badge/License-mit-brightgreen.svg)](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflow-lab%2Fdlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflow-lab%2Fdlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflow-lab%2Fdlog/lists"}