{"id":13413313,"url":"https://github.com/hashicorp/logutils","last_synced_at":"2025-05-14T01:03:22.137Z","repository":{"id":11087257,"uuid":"13435885","full_name":"hashicorp/logutils","owner":"hashicorp","description":"Utilities for slightly better logging in Go (Golang).","archived":false,"fork":false,"pushed_at":"2024-12-02T16:04:37.000Z","size":18,"stargazers_count":368,"open_issues_count":4,"forks_count":33,"subscribers_count":304,"default_branch":"master","last_synced_at":"2025-05-03T02:09:42.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashicorp.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-09T07:31:15.000Z","updated_at":"2025-02-08T22:13:42.000Z","dependencies_parsed_at":"2024-12-24T11:45:13.008Z","dependency_job_id":"f1a3b0d8-fb88-4cca-9413-108790b25245","html_url":"https://github.com/hashicorp/logutils","commit_stats":{"total_commits":18,"total_committers":7,"mean_commits":"2.5714285714285716","dds":"0.38888888888888884","last_synced_commit":"127077f645bf3162cff69c6518f7da4f0b0409e2"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Flogutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Flogutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Flogutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Flogutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashicorp","download_url":"https://codeload.github.com/hashicorp/logutils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043885,"owners_count":22005031,"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":[],"created_at":"2024-07-30T20:01:37.471Z","updated_at":"2025-05-14T01:03:22.116Z","avatar_url":"https://github.com/hashicorp.png","language":"Go","readme":"# logutils\n\nlogutils is a Go package that augments the standard library \"log\" package\nto make logging a bit more modern, without fragmenting the Go ecosystem\nwith new logging packages.\n\n## The simplest thing that could possibly work\n\nPresumably your application already uses the default `log` package. To switch, you'll want your code to look like the following:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/hashicorp/logutils\"\n)\n\nfunc main() {\n\tfilter := \u0026logutils.LevelFilter{\n\t\tLevels: []logutils.LogLevel{\"DEBUG\", \"WARN\", \"ERROR\"},\n\t\tMinLevel: logutils.LogLevel(\"WARN\"),\n\t\tWriter: os.Stderr,\n\t}\n\tlog.SetOutput(filter)\n\n\tlog.Print(\"[DEBUG] Debugging\") // this will not print\n\tlog.Print(\"[WARN] Warning\") // this will\n\tlog.Print(\"[ERROR] Erring\") // and so will this\n\tlog.Print(\"Message I haven't updated\") // and so will this\n}\n```\n\nThis logs to standard error exactly like go's standard logger. Any log messages you haven't converted to have a level will continue to print as before.\n","funding_links":[],"categories":["Logging","日志","日志记录","Logging 日志库","Relational Databases","日誌","Go","\u003cspan id=\"日志-logging\"\u003e日志 Logging\u003c/span\u003e"],"sub_categories":["Search and Analytic Databases","Advanced Console UIs","交流","检索及分析资料库","SQL 查询语句构建库","高級控制台界面","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高级控制台界面"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Flogutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashicorp%2Flogutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Flogutils/lists"}