{"id":17918905,"url":"https://github.com/xuri/glc","last_synced_at":"2025-03-23T23:31:14.852Z","repository":{"id":57489986,"uuid":"126347653","full_name":"xuri/glc","owner":"xuri","description":"GLC (glog cleaner) is a log cleaner for glog. ","archived":false,"fork":false,"pushed_at":"2020-11-03T02:15:19.000Z","size":77,"stargazers_count":27,"open_issues_count":1,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-19T00:41:30.520Z","etag":null,"topics":["cleaner","glog","golang","log","logger","logger-middleware","logging","logging-library","middleware"],"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/xuri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null},"funding":{"patreon":"xuri","ko_fi":"xurime","liberapay":"xuri","issuehunt":"xuri"}},"created_at":"2018-03-22T14:28:08.000Z","updated_at":"2023-01-03T13:33:27.000Z","dependencies_parsed_at":"2022-09-02T12:00:55.893Z","dependency_job_id":null,"html_url":"https://github.com/xuri/glc","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/xuri%2Fglc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuri%2Fglc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuri%2Fglc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuri%2Fglc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuri","download_url":"https://codeload.github.com/xuri/glc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186645,"owners_count":20574551,"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":["cleaner","glog","golang","log","logger","logger-middleware","logging","logging-library","middleware"],"created_at":"2024-10-28T20:13:22.416Z","updated_at":"2025-03-23T23:31:14.549Z","avatar_url":"https://github.com/xuri.png","language":"Go","funding_links":["https://patreon.com/xuri","https://ko-fi.com/xurime","https://liberapay.com/xuri","https://issuehunt.io/r/xuri","https://www.paypal.me/xuri"],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"210\" src=\"./glc.png\" alt=\"GLC (glog cleaner)\"\u003e\n\n# GLC (glog cleaner)\n\n[![Build Status](https://travis-ci.com/xuri/glc.svg?branch=master)](https://travis-ci.com/xuri/glc)\n[![Code Coverage](https://codecov.io/gh/xuri/glc/branch/master/graph/badge.svg)](https://codecov.io/gh/xuri/glc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/xuri/glc)](https://goreportcard.com/report/github.com/xuri/glc)\n[![go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/xuri/glc)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/xuri/glc/blob/master/LICENSE)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/xuri)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fxuri%2Fglc.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fxuri%2Fglc?ref=badge_shield)\n\n## Overview\n\nGLC (glog cleaner) is a log clear for glog written in Go. This library support for deleting old logs. There are tools which can be run to do the cleanup such as logrotate, but logrotate can't runs on Windows and embedded system, so we need a cross platform library to rotate the log.\n\n## Installation\n\n```go\ngo get github.com/xuri/glc\n```\n\n## Usage\n\nHere is a example usage that will do check every hour and clean the log files that creation time older than 30 minutes.\n\n```go\nglc.NewGLC(glc.InitOption{\n\tPath:     path,\n\tPrefix:   `glc`,\n\tInterval: time.Duration(time.Hour),\n\tReserve:  time.Duration(time.Minute * 30),\n})\n```\n\n## Contributing\n\nContributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.\n\n## Licenses\n\nThis program is under the terms of the MIT License. See [LICENSE](https://github.com/xuri/glc/blob/master/LICENSE) for the full license text.\n\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fxuri%2Fglc.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fxuri%2Fglc?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuri%2Fglc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuri%2Fglc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuri%2Fglc/lists"}