{"id":19603931,"url":"https://github.com/kubermatic/glog-logrus","last_synced_at":"2025-04-27T19:32:29.307Z","repository":{"id":57481374,"uuid":"146572904","full_name":"kubermatic/glog-logrus","owner":"kubermatic","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-29T08:55:39.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-05T02:21:55.513Z","etag":null,"topics":["glog","logrus"],"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/kubermatic.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-08-29T08:55:18.000Z","updated_at":"2020-05-07T18:25:15.000Z","dependencies_parsed_at":"2022-09-26T17:50:29.012Z","dependency_job_id":null,"html_url":"https://github.com/kubermatic/glog-logrus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubermatic%2Fglog-logrus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubermatic%2Fglog-logrus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubermatic%2Fglog-logrus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubermatic%2Fglog-logrus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubermatic","download_url":"https://codeload.github.com/kubermatic/glog-logrus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251195944,"owners_count":21550873,"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":["glog","logrus"],"created_at":"2024-11-11T09:33:45.669Z","updated_at":"2025-04-27T19:32:29.025Z","avatar_url":"https://github.com/kubermatic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glog-logrus\n\nThis packages is a replacement for [glog](github.com/golang/glog)\nin projects that use the [logrus](https://godoc.org/github.com/sirupsen/logrus).\n\nIt is inspired by istio's glog package for zap:\nhttps://github.com/istio/glog\n\n## Usage\n\nOverride the official glog package with this one.\nThis simply replaces the code in `vendor/golang/glog` with the code of this package.\n\nIn your `Gopkg.toml`:\n```toml\n[[override]]\n  name = \"github.com/golang/glog\"\n  source = \"github.com/kubermatic/glog-logrus\"\n```\n\nIn your `main.go`:\n```go\n// Import the package like it is original glog\nimport (\n  \"github.com/golang/glog\"\n  \"github.com/sirupsen/logrus\"\n)\n\n// Create logrus logger in your main.go\nlogger := logrus.New()\nlogger.Formatter = \u0026logrus.JSONFormatter{DisableTimestamp: true}\n\n// Overriding the default glog with our logrus glog implementation.\n// Thus we need to pass it our logrus logger object.\nglog.SetLogger(logger.WithField(\"foo\", \"bar\"))\n```\n\nSetting the logger to the glog package **MUST** happen before using glog in any package.\n\nThe functionality of logging the filename and line number is not preserved at this time.\n\n## Function Levels\n\n|     glog     | logrus |\n| ------------ | ------ |\n| Info         | Debug  |\n| InfoDepth    | Debug  |\n| Infof        | Debug  |\n| Infoln       | Debug  |\n| Warning      | Warn   |\n| WarningDepth | Warn   |\n| Warningf     | Warn   |\n| Warningln    | Warn   |\n| Error        | Error  |\n| ErrorDepth   | Error  |\n| Errorf       | Error  |\n| Errorln      | Error  |\n| Exit         | Fatal  |\n| ExitDepth    | Fatal  |\n| Exitf        | Fatal  |\n| Exitln       | Fatal  |\n| Fatal        | Fatal  |\n| FatalDepth   | Fatal  |\n| Fatalf       | Fatal  |\n| Fatalln      | Fatal  |\n\nThis table is rather opinionated and build for use with the Kubernetes' [Go client](https://github.com/kubernetes/client-go).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubermatic%2Fglog-logrus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubermatic%2Fglog-logrus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubermatic%2Fglog-logrus/lists"}