{"id":19703556,"url":"https://github.com/monibuca/plugin-logrotate","last_synced_at":"2025-04-29T14:30:52.396Z","repository":{"id":48830012,"uuid":"255099675","full_name":"Monibuca/plugin-logrotate","owner":"Monibuca","description":"提供日志分割功能，并提供UI界面可供下载日志和实时日志跟踪等功能","archived":false,"fork":false,"pushed_at":"2024-12-13T09:09:33.000Z","size":183,"stargazers_count":3,"open_issues_count":3,"forks_count":19,"subscribers_count":1,"default_branch":"v4","last_synced_at":"2025-04-05T17:51:08.734Z","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/Monibuca.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-12T14:26:56.000Z","updated_at":"2024-08-01T09:04:54.000Z","dependencies_parsed_at":"2024-08-01T10:30:02.530Z","dependency_job_id":null,"html_url":"https://github.com/Monibuca/plugin-logrotate","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-logrotate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-logrotate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-logrotate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-logrotate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Monibuca","download_url":"https://codeload.github.com/Monibuca/plugin-logrotate/tar.gz/refs/heads/v4","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251518833,"owners_count":21602218,"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-11-11T21:18:13.968Z","updated_at":"2025-04-29T14:30:47.984Z","avatar_url":"https://github.com/Monibuca.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LogRotate插件\n\n可以实时查看日志输出，和日志查询\n日志查询暂时只支持linux系统\n\n## 插件地址\nhttps://github.com/Monibuca/plugin-logrotate\n\n# 插件引入\n```go\nimport (\n    _ \"m7s.live/plugin/logrotate/v4\"\n)\n```\n## 默认配置\n```yaml\nlogrotate:\n path: ./logs # 生成日志的目录\n size: 0 # 每个日志文件的大小，单位字节，0表示不限制\n days: 1 # 按时间分割，单位是天，即24小时\n maxdays: 3 #日志文件保留天数\n formatter : 2006-01-02T15 # 日志文件名格式化，按照go layout格式化，默认按照小时\n```\n## API接口\n\n### GET `logrotate/api/tail`\n监听日志输出，该请求是一个SSE（server-sent Event）\n\n### GET `logrotate/api/find` \n查找日志，目前只支持linux系统（使用grep），参数为 `?query=xxx`，比如 `/logrotate/api/find?query=monibuca`\n### GET `logrotate/api/list` \n日志列表，列出所有日志文件\n### GET `logrotate/api/open` \n打开日志，入参是 `?file=xxx`， `xxx`为文件名，文件名来自日志列表中的文件，比如 `logrotate/api/open?file=2024-01-23T09.log` \n### GET `logrotate/api/download` \n下载某个日志，入参是`?file=xxx`，参数同上打开日志\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-logrotate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonibuca%2Fplugin-logrotate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-logrotate/lists"}