{"id":17325060,"url":"https://github.com/orandin/lumberjackrus","last_synced_at":"2025-04-14T16:55:14.321Z","repository":{"id":57482105,"uuid":"159018044","full_name":"orandin/lumberjackrus","owner":"orandin","description":"A local file system hook for sirupsen/logrus ","archived":false,"fork":false,"pushed_at":"2019-04-28T10:36:36.000Z","size":5,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T05:31:39.977Z","etag":null,"topics":["logrus","logrus-hook"],"latest_commit_sha":null,"homepage":"","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/orandin.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-11-25T09:56:22.000Z","updated_at":"2024-12-12T13:30:28.000Z","dependencies_parsed_at":"2022-09-06T10:32:06.906Z","dependency_job_id":null,"html_url":"https://github.com/orandin/lumberjackrus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orandin%2Flumberjackrus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orandin%2Flumberjackrus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orandin%2Flumberjackrus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orandin%2Flumberjackrus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orandin","download_url":"https://codeload.github.com/orandin/lumberjackrus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248923255,"owners_count":21183945,"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":["logrus","logrus-hook"],"created_at":"2024-10-15T14:12:21.012Z","updated_at":"2025-04-14T16:55:14.300Z","avatar_url":"https://github.com/orandin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lumberjackrus | local filesystem hook for Logrus\n\n## Example\n\n```golang\npackage main\n\nimport (\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/orandin/lumberjackrus\"\n)\n\nfunc init() {\n\tlogrus.SetFormatter(\u0026logrus.TextFormatter{})\n\tlogrus.SetLevel(logrus.DebugLevel)\n\n\thook, err := lumberjackrus.NewHook(\n\t\t\u0026lumberjackrus.LogFile{\n\t\t\tFilename:   \"/tmp/general.log\",\n\t\t\tMaxSize:    100,\n\t\t\tMaxBackups: 1,\n\t\t\tMaxAge:     1,\n\t\t\tCompress:   false,\n\t\t\tLocalTime:  false,\n\t\t},\n\t\tlogrus.InfoLevel,\n\t\t\u0026logrus.TextFormatter{},\n\t\t\u0026lumberjackrus.LogFileOpts{\n\t\t\tlogrus.InfoLevel: \u0026lumberjackrus.LogFile{\n\t\t\t\tFilename: \"/tmp/info.log\",\n\t\t\t},\n\t\t\tlogrus.ErrorLevel: \u0026lumberjackrus.LogFile{\n\t\t\t\tFilename:   \"/tmp/error.log\",\n\t\t\t\tMaxSize:    100,   // optional\n\t\t\t\tMaxBackups: 1,     // optional\n\t\t\t\tMaxAge:     1,     // optional\n\t\t\t\tCompress:   false, // optional\n\t\t\t\tLocalTime:  false, // optional\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tlogrus.AddHook(hook)\n}\n\nfunc main() {\n\tlogrus.Debug(\"Debug message\") // It is not written to a file (because debug level \u003c minLevel)\n\tlogrus.Info(\"Info message\")   // Written in /tmp/info.log\n\tlogrus.Warn(\"Warn message\")   // Written in /tmp/general.log\n\tlogrus.Error(\"Error message\") // Written in /tmp/error.log\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forandin%2Flumberjackrus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forandin%2Flumberjackrus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forandin%2Flumberjackrus/lists"}