{"id":16584270,"url":"https://github.com/markdumay/go-log","last_synced_at":"2026-06-06T11:31:06.987Z","repository":{"id":46228448,"uuid":"405890092","full_name":"markdumay/go-log","owner":"markdumay","description":"Simplified application logger powered by zerolog","archived":false,"fork":false,"pushed_at":"2023-07-31T05:12:49.000Z","size":47,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T10:58:38.019Z","etag":null,"topics":["golang","logging"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/go.markdumay.org/log","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/markdumay.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-13T08:20:04.000Z","updated_at":"2021-11-05T04:58:38.000Z","dependencies_parsed_at":"2024-06-21T00:25:52.568Z","dependency_job_id":"f6b0f7f9-d7ca-487c-9d66-388b4005e2d2","html_url":"https://github.com/markdumay/go-log","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/markdumay/go-log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdumay%2Fgo-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdumay%2Fgo-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdumay%2Fgo-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdumay%2Fgo-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markdumay","download_url":"https://codeload.github.com/markdumay/go-log/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdumay%2Fgo-log/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33981122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","logging"],"created_at":"2024-10-11T22:44:18.931Z","updated_at":"2026-06-06T11:31:06.971Z","avatar_url":"https://github.com/markdumay.png","language":"Go","funding_links":["https://www.buymeacoffee.com/markdumay"],"categories":[],"sub_categories":[],"readme":"# go-log\n\n\u003c!-- Tagline --\u003e\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eSimplified application logger powered by zerolog\u003c/b\u003e\n    \u003cbr /\u003e\n\u003c/p\u003e\n\n\n\u003c!-- Badges --\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pkg.go.dev/go.markdumay.org/log\" alt=\"Go Package\"\u003e\n        \u003cimg src=\"https://pkg.go.dev/badge/go.markdumay.org/log.svg\" alt=\"Go Reference\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/markdumay/go-log/releases/latest\" alt=\"Go Module\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/tag/markdumay/go-log?label=module\" alt=\"Go Module\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.codefactor.io/repository/github/markdumay/go-log\" alt=\"CodeFactor\"\u003e\n        \u003cimg src=\"https://img.shields.io/codefactor/grade/github/markdumay/go-log\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/markdumay/go-log/commits/main\" alt=\"Last commit\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/last-commit/markdumay/go-log.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/markdumay/go-log/issues\" alt=\"Issues\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues/markdumay/go-log.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/markdumay/go-log/pulls\" alt=\"Pulls\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues-pr-raw/markdumay/go-log.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/markdumay/go-log/blob/main/LICENSE\" alt=\"License\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/markdumay/go-log\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- Table of Contents --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#about\"\u003eAbout\u003c/a\u003e •\n  \u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e •\n  \u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e •\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e •\n  \u003ca href=\"#donate\"\u003eDonate\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n\n## About\ngo-log is a simplified logger package for Go applications. Using the Zero Allocation JSON Logger (zerolog) under the hood, it simplifies the logging of application-wide messages. It supports three logging modes: Default, Pretty, and JSON. Logs are directed to the console by default, but can be buffered or redirected to a log file instead.\n\n## Built With\nThe project uses the following core software components:\n* [Zero Allocation JSON Logger][zerolog_url] - Go package providing a fast and simple logger dedicated to JSON output.\n* [Testify][testify_url] - Go unit-testing toolkit with common assertions and mocks.\n\n## Prerequisites\ngo-log requires Go version 1.16 or later to be installed on your system.\n\n## Installation\n```console\ngo get -u go.markdumay.org/log\n```\n\n## Usage\nImport go-log into your application to start using the logger. By default, go-log writes the log messages to the console. Please refer to the [package documentation][package] for more details. The following code snippet illustrates the basic usage of go-log.\n\n```go\npackage main\n\nimport (\n    \"go.markdumay.org/log\"\n)\n\nfunc main() {\n    // show an info message using default formatting, expected output:\n    // This is an info log\n    log.Info(\"This is an info log\")\n\n    // show an error message using default formatting, expected output:\n    // ERROR  Error message\n    log.Info(\"Error message\")\n\n    // switch to pretty formatting\n    log.InitLogger(log.Pretty)\n\n    // show a warning using pretty formatting, expected output:\n    // 2006-01-02T15:04:05Z07:00 | WARN   | Warning\n    log.Warn(\"Warning\")\n\n    // switch to JSON formatting\n    log.InitLogger(log.JSON)\n\n    // switch to debug level as minimum level\n    log.SetGlobalLevel(log.DebugLevel)\n\n    // show a debug message using JSON formatting, expected output:\n    // {\"level\":\"debug\",\"time\":\"2006-01-02T15:04:05Z07:00\",\"message\":\"Testing level debug\"}\n    log.Debugf(\"Testing level %s\", \"debug\")\n}\n```\n\n## Contributing\ngo-log welcomes contributions of any kind. It is recommended to create an issue to discuss your intended contribution before submitting a larger pull request though. Please consider the following guidelines when contributing:\n- Address all linting recommendations from `golangci-lint run` (using `.golangci.yml` from the repository).\n- Ensure the code is covered by one or more unit tests (using [Testify][testify_url] when applicable).\n- Follow the recommendations from [Effective Go][effective_go] and the [Uber Go Style Guide][uber_go_guide].\n\nThe following steps decribe how to submit a Pull Request:\n1. Clone the repository and create a new branch \n    ```console\n    $ git checkout https://github.com/markdumay/go-log.git -b name_for_new_branch\n    ```\n2. Make and test the changes\n3. Submit a Pull Request with a comprehensive description of the changes\n\n## Donate\n\u003ca href=\"https://www.buymeacoffee.com/markdumay\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/lato-orange.png\" alt=\"Buy Me A Coffee\" style=\"height: 51px !important;width: 217px !important;\"\u003e\u003c/a\u003e\n\n## License\nThe go-log codebase is released under the [MIT license][license]. The documentation (including the \"README\") is licensed under the Creative Commons ([CC BY-NC 4.0)][cc-by-nc-4.0] license.\n\n\u003c!-- MARKDOWN PUBLIC LINKS --\u003e\n[cc-by-nc-4.0]: https://creativecommons.org/licenses/by-nc/4.0/\n[effective_go]: https://golang.org/doc/effective_go\n[testify_url]: https://github.com/stretchr/testify\n[uber_go_guide]: https://github.com/uber-go/guide/\n[zerolog_url]: https://github.com/rs/zerolog\n\n\u003c!-- MARKDOWN MAINTAINED LINKS --\u003e\n\u003c!-- TODO: add blog link\n[blog]: https://markdumay.com\n--\u003e\n[blog]: https://github.com/markdumay\n[license]: https://github.com/markdumay/go-log/blob/main/LICENSE\n[package]: https://pkg.go.dev/go.markdumay.org/log\n[repository]: https://github.com/markdumay/go-log.git\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkdumay%2Fgo-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkdumay%2Fgo-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkdumay%2Fgo-log/lists"}