{"id":19290018,"url":"https://github.com/gleich/lumber","last_synced_at":"2025-10-31T22:30:26.536Z","repository":{"id":45454658,"uuid":"329471247","full_name":"gleich/lumber","owner":"gleich","description":"Easy to use \u0026 pretty logger for golang","archived":false,"fork":false,"pushed_at":"2025-01-04T21:45:18.000Z","size":2923,"stargazers_count":53,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T06:11:15.233Z","etag":null,"topics":["go","golang","gomodule","logging","modules"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"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/gleich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-01-14T01:02:54.000Z","updated_at":"2025-01-04T21:45:21.000Z","dependencies_parsed_at":"2024-08-21T04:42:00.047Z","dependency_job_id":"e7258c6f-cea6-47a0-81de-2b3a60f10fbc","html_url":"https://github.com/gleich/lumber","commit_stats":null,"previous_names":["matt-gleich/lumber"],"tags_count":18,"template":false,"template_full_name":"gleich/go_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleich%2Flumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleich%2Flumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleich%2Flumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleich%2Flumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gleich","download_url":"https://codeload.github.com/gleich/lumber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239236680,"owners_count":19604912,"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":["go","golang","gomodule","logging","modules"],"created_at":"2024-11-09T22:17:49.134Z","updated_at":"2025-10-31T22:30:26.496Z","avatar_url":"https://github.com/gleich.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003elumber\u003c/h1\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/gleich/lumber/v3\"\u003e\u003cimg alt=\"Godoc Reference\" src=\"https://godoc.org/github.com/gleich/lumber?status.svg\"\u003e\u003c/a\u003e\n    \u003cimg alt=\"lint workflow result\" src=\"https://github.com/gleich/lumber/workflows/lint/badge.svg\"\u003e\n    \u003cimg alt=\"GitHub go.mod Go version\" src=\"https://img.shields.io/github/go-mod/go-version/gleich/lumber\"\u003e\n    \u003cimg alt=\"Golang report card\" src =\"https://goreportcard.com/badge/github.com/gleich/lumber/v3\"\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003ci\u003eEasy to use \u0026 pretty logger for golang\u003c/i\u003e\n\u003c/div\u003e\n\u003chr\u003e\n\n_This project is no longer maintained. Please use [timber](https://github/gleich/timber)._\n\n- [Install](#-install)\n- [Logging Functions](#-logging-functions)\n  - [`lumber.Done()`](#lumberDone)\n  - [`lumber.Info()`](#lumberinfo)\n  - [`lumber.Debug()`](#lumberdebug)\n  - [`lumber.Warning()`](#lumberwarning)\n  - [`lumber.Error()`](#lumbererror)\n  - [`lumber.ErrorMsg()`](#lumbererrormsg)\n  - [`lumber.Fatal()`](#lumberfatal)\n  - [`lumber.FatalMsg()`](#lumberfatalmsg)\n- [Customization](#️-customization)\n- [Examples](#-examples)\n\n## Install\n\nSimply run the following from your project root:\n\n```bash\ngo get -u github.com/gleich/lumber/v3\n```\n\n## Logging Functions\n\n### [`lumber.Done()`](https://pkg.go.dev/github.com/gleich/lumber/v3#Done)\n\nOutput a \"DONE\" log.\n\nDemo:\n\n```go\npackage main\n\nimport (\n    \"time\"\n\n    \"github.com/gleich/lumber/v3\"\n)\n\nfunc main() {\n    lumber.Done(\"booted up the program!\")\n    time.Sleep(2 * time.Second)\n    lumber.Done(\"waited 2 seconds!\")\n}\n```\n\nOutputs:\n\n![Done output](images/done.png)\n\n### [`lumber.Info()`](https://pkg.go.dev/github.com/gleich/lumber/v3#Info)\n\nOutput an info log.\n\nDemo:\n\n```go\npackage main\n\nimport (\n    \"time\"\n\n    \"github.com/gleich/lumber/v3\"\n)\n\nfunc main() {\n    lumber.Info(\"Getting the current year\")\n    now := time.Now()\n    lumber.Info(\"Current year is\", now.Year())\n}\n```\n\nOutputs:\n\n![info output](images/info.png)\n\n### [`lumber.Debug()`](https://pkg.go.dev/github.com/gleich/lumber/v3#Debug)\n\nOutput a debug log.\n\nDemo:\n\n```go\npackage main\n\nimport (\n    \"os\"\n\n    \"github.com/gleich/lumber/v3\"\n)\n\nfunc main() {\n    homeDir, _ := os.UserHomeDir()\n    lumber.Debug(\"User's home dir is\", homeDir)\n}\n```\n\nOutputs:\n\n![debug output](images/debug.png)\n\n### [`lumber.Warning()`](https://pkg.go.dev/github.com/gleich/lumber/v3#Warning)\n\nOutput a warning log.\n\nDemo:\n\n```go\npackage main\n\nimport (\n    \"time\"\n\n    \"github.com/gleich/lumber/v3\"\n)\n\nfunc main() {\n    now := time.Now()\n    if now.Year() != 2004 {\n        lumber.Warning(\"Current year isn't 2004\")\n    }\n}\n```\n\nOutputs:\n\n![warning output](images/warning.png)\n\n### [`lumber.Error()`](https://pkg.go.dev/github.com/gleich/lumber/v3#Error)\n\nOutput an error log with a stack trace.\n\nDemo:\n\n```go\npackage main\n\nimport (\n    \"os\"\n\n    \"github.com/gleich/lumber/v3\"\n)\n\nfunc main() {\n    fname := \"invisible-file.txt\"\n    _, err := os.ReadFile(fName)\n    if err != nil {\n        lumber.Error(err, \"Failed to read from\", fname)\n    }\n}\n```\n\nOutputs:\n\n![error output](images/error.png)\n\n### [`lumber.ErrorMsg()`](https://pkg.go.dev/github.com/gleich/lumber/v3#ErrorMsg)\n\nOutput an error message.\n\nDemo:\n\n```go\npackage main\n\nimport \"github.com/gleich/lumber/v3\"\n\nfunc main() {\n    lumber.ErrorMsg(\"Ahhh stuff broke\")\n}\n```\n\nOutputs:\n\n![errorMsg output](images/errorMsg.png)\n\n### [`lumber.Fatal()`](https://pkg.go.dev/github.com/gleich/lumber/v3#Fatal)\n\nOutput a fatal log with a stack trace.\n\nDemo:\n\n```go\npackage main\n\nimport (\n    \"os\"\n\n    \"github.com/gleich/lumber/v3\"\n)\n\nfunc main() {\n    fName := \"invisible-file.txt\"\n    _, err := os.ReadFile(fName)\n    if err != nil {\n        lumber.Fatal(err, \"Failed to read from\", fName)\n    }\n}\n```\n\nOutputs:\n\n![fatal output](images/fatal.png)\n\n### [`lumber.FatalMsg()`](https://pkg.go.dev/github.com/gleich/lumber/v3#FatalMsg)\n\nOutput a fatal message.\n\nDemo:\n\n```go\npackage main\n\nimport \"github.com/gleich/lumber/v3\"\n\nfunc main() {\n    lumber.FatalMsg(\"Ahhh stuff broke\")\n}\n```\n\nOutputs:\n\n![fatalMsg output](images/fatalMsg.png)\n\n## Customization\n\nYou can customize the logger that lumber uses. Below is an example of some of this customization:\n\n```go\npackage main\n\nimport (\n    \"time\"\n\n    \"github.com/gleich/lumber/v3\"\n)\n\nfunc main() {\n    lumber.SetTimezone(time.Local)\n    lumber.SetTimeFormat(\"Mon Jan 2 15:04:05 MST 2006\")\n    lumber.SetFatalExitCode(0)\n\n    lumber.Done(\"Calling from custom logger\")\n}\n```\n\n# Examples\n\nSee some examples in the [\\_examples/](_examples/) folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleich%2Flumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgleich%2Flumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleich%2Flumber/lists"}