{"id":24511301,"url":"https://github.com/hamba/logger","last_synced_at":"2025-04-14T08:21:47.126Z","repository":{"id":37502833,"uuid":"170083295","full_name":"hamba/logger","owner":"hamba","description":"A fast Go logger","archived":false,"fork":false,"pushed_at":"2025-03-24T17:12:50.000Z","size":139,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T21:52:12.806Z","etag":null,"topics":["golang","logger"],"latest_commit_sha":null,"homepage":null,"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/hamba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-11T07:06:39.000Z","updated_at":"2025-03-10T17:11:44.000Z","dependencies_parsed_at":"2023-11-20T17:47:55.978Z","dependency_job_id":"45ad7f7b-eb6a-4b66-81da-744674ca4dd8","html_url":"https://github.com/hamba/logger","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamba%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamba%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamba%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamba%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamba","download_url":"https://codeload.github.com/hamba/logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844037,"owners_count":21170506,"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":["golang","logger"],"created_at":"2025-01-22T00:37:16.127Z","updated_at":"2025-04-14T08:21:47.095Z","avatar_url":"https://github.com/hamba.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](http://svg.wiersma.co.za/hamba/project?title=logger\u0026tag=fast%20Go%20logger)\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/hamba/logger)](https://goreportcard.com/report/github.com/hamba/logger)\n[![Build Status](https://github.com/hamba/logger/actions/workflows/test.yml/badge.svg)](https://github.com/hamba/logger/actions)\n[![Coverage Status](https://coveralls.io/repos/github/hamba/logger/badge.svg?branch=master)](https://coveralls.io/github/hamba/logger?branch=master)\n[![Go Reference](https://pkg.go.dev/badge/github.com/hamba/logger/v2.svg)](https://pkg.go.dev/github.com/hamba/logger/v2)\n[![GitHub release](https://img.shields.io/github/release/hamba/logger.svg)](https://github.com/hamba/logger/releases)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hamba/logger/master/LICENSE)\n\nlogger is a fast Go logging package made to be simple but effective.\n\n## Overview\n\nInstall with:\n\n```shell\ngo get github.com/hamba/logger/v2\n```\n\n#### Formatters\n\n* **JSON**\n* **Logfmt**\n* **Console**\n\n#### Writers\n\n* **SyncWriter** Write synchronised to a Writer\n\n**Note:** This project has renamed the default branch from `master` to `main`. You will need to update your local environment.\n\n## Examples\n\n```go\nlog := logger.New(os.Stdout, logger.LogfmtFormat(), logger.Info)\n\n// Logger can have scoped context\nlog = log.With(ctx.Str(\"env\", \"prod\"))\n\n// All messages can have a context\nlog.Warn(\"connection error\", ctx.Str(\"redis\", \"dsn_1\"), ctx.Int(\"timeout\", conn.Timeout()))\n```\n\nWill log the message\n\n```\nlvl=warn msg=\"connection error\" env=prod redis=dsn_1 timeout=0.500\n```\n\nMore examples can be found in the [godocs](https://godoc.org/github.com/hamba/logger).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamba%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamba%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamba%2Flogger/lists"}