{"id":15345695,"url":"https://github.com/git-hulk/logrus-hooks","last_synced_at":"2025-04-05T06:23:33.979Z","repository":{"id":57489068,"uuid":"100686146","full_name":"git-hulk/logrus-hooks","owner":"git-hulk","description":"hooks for logrus","archived":false,"fork":false,"pushed_at":"2018-08-28T07:06:08.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T14:12:26.433Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/git-hulk.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":"2017-08-18T07:35:45.000Z","updated_at":"2018-08-28T07:06:09.000Z","dependencies_parsed_at":"2022-08-29T22:11:38.188Z","dependency_job_id":null,"html_url":"https://github.com/git-hulk/logrus-hooks","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/git-hulk%2Flogrus-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-hulk%2Flogrus-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-hulk%2Flogrus-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-hulk%2Flogrus-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-hulk","download_url":"https://codeload.github.com/git-hulk/logrus-hooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247296220,"owners_count":20915598,"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-10-01T11:14:54.698Z","updated_at":"2025-04-05T06:23:33.955Z","avatar_url":"https://github.com/git-hulk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logrus-hooks\n\n* Rotate Hook, rotate the log file by daily(default) or hour\n* Source Hook, append the caller to log's message \n\n## How to use\n\n```go\npackage main\n\nimport (\n    \"github.com/Sirupsen/logrus\"\n    hooks \"github.com/git-hulk/logrus-hooks\"\n)\n\nfunc main() {\n    logger := logrus.New()\n    // Create rotate hook\n    rotateHook, err := hooks.NewRotateHook(logger, \"/www/mydir\", \"test\")\n    if err != nil {\n        // do something and exit\n    }\n    logger.Hooks.Add(rotateHook)\n    // Create source hook\n    logger.Hooks.Add(hooks.NewSourceHook(logrus.InfoLevel))\n    logger.Info(\"foo\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-hulk%2Flogrus-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-hulk%2Flogrus-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-hulk%2Flogrus-hooks/lists"}