{"id":22152283,"url":"https://github.com/auula/sprout","last_synced_at":"2025-07-26T05:32:15.058Z","repository":{"id":55978501,"uuid":"256441991","full_name":"auula/sprout","owner":"auula","description":"Golang logging library supporting log retrieval.","archived":false,"fork":false,"pushed_at":"2021-05-05T12:02:31.000Z","size":122,"stargazers_count":82,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-17T15:20:02.277Z","etag":null,"topics":["color","file","golang","golang-library","golang-package","linux","log","logfile","logger","logging","websoket","windows"],"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/auula.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":"2020-04-17T08:10:18.000Z","updated_at":"2024-01-19T10:15:00.000Z","dependencies_parsed_at":"2022-08-15T10:40:43.909Z","dependency_job_id":null,"html_url":"https://github.com/auula/sprout","commit_stats":null,"previous_names":["higker/logker","higker/glog","higker/sprout"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auula%2Fsprout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auula%2Fsprout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auula%2Fsprout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auula%2Fsprout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auula","download_url":"https://codeload.github.com/auula/sprout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227652565,"owners_count":17799235,"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":["color","file","golang","golang-library","golang-package","linux","log","logfile","logger","logging","websoket","windows"],"created_at":"2024-12-02T00:49:41.436Z","updated_at":"2024-12-02T00:49:42.223Z","avatar_url":"https://github.com/auula.png","language":"Go","readme":"### ⚠️ 本库是本人在入坑go一个星期的时候写出来的，代码质量有点差，谨慎使用！，后面有空将会重构。\n\n\u003cp align=\"center\"\u003e\n    \u003ch1 align=\"center\"\u003eLogKer\u003c/h1\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ccode\u003e\nLogKer\u003c/code\u003e It's a log Library of Golang. It's easy to use.👨‍💻‍\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    📚\u003ca href=\"https://github.com/Higker/logker/blob/master/readme_zh.md\" target=\"_blank\"\u003e中文说明\u003c/a\u003e | \n    🤩\u003ca href=\"https://pkg.go.dev/github.com/higker/logker?tab=doc\" target=\"_blank\"\u003eDocument\u003c/a\u003e | \n    👨‍💻‍ \u003ca href=\"https://github.com/Higker/logker/releases\" target=\"_blank\"\u003eRelease\u003c/a\u003e \n\u003c/p\u003e\n\n---\n\n## Video link\n- [哔哩哔哩](https://www.bilibili.com/video/BV1WZ4y1s7zD?t=2)\n\n## Features\n\n- Support file backup.\n- Simple and easy to use.\n- Support file storage log.\n- Support console color printing.\n- Custom log file storage location.\n- Support setting time and time zone.\n- Support log file size for split storage.\n- Error level output to specified file separately.\n- Four levels of `debug` `info` `error` `warning` are supported.\n- `Future support: The remote computer stores the socket output🙏.`\n- `The project is constantly maintained and updated. I like 😍A kind of Please click star Thanks♪(･ω･)ﾉ!`\n- Is this you?😜\n\n![](https://tva1.sinaimg.cn/large/007S8ZIlgy1ge3na9rkzwg308c04oe5c.gif)\n\n## Upgrade List\n- [v1.1.5](https://github.com/Higker/logker/releases/tag/v1.1.5) Support for custom message formats.(SerialVersion)  [issues1](https://github.com/Higker/logker/issues/1)\n- [v1.1.8](https://github.com/Higker/logker/releases/tag/v1.1.8) Support coroutine to record logs,The code base is smaller and lighter(AsynchronousProcessingVersion). \n\n\n## Historical Documents\n\u003e The Documents version is v1.1.8\n- [PPT](https://www.kdocs.cn/l/sGu6KjnJW)\n- [v1.1.5 Doc](https://github.com/Higker/logker/blob/master/readme_v1.1.5.md)\n\n## Installation\n\n🔝 The minimum requirement of Go version is **1.11**.\n🔝 Your project also uses go module!!!\n\n```shell script\ngo get github.com/higker/logker\n```\nOR\n```shell script\ngo get -u github.com/higker/logker\n```\n\ncommand add `-u` flag to update in the future.\n\n\n## Use Example\n#### 1. File Logger\n```go\npackage main\n\nimport (\n\tklog \"github.com/higker/logker\"\n\t\"time\"\n)\n\nfunc main() {\n\t// Specify file location! Create folder in advance!!\n\tdir := \"/Users/ding/Documents/test_log\"\n\t// New file logger\n\t// File Max size : You can also use built-in constants\n\t// klog.GB1  \t= 1GB\n\t// klog.MB10  \t= 10MB\n \t// klog.MB100\t= 100MB\n\tformat := \"{level} - DATE {time}  - POS {position} - MSG {message}\" //This version was modified from v 1.1.5\n\t//Create Log Buffer\n    \ttask := InitAsync(Qs1w)\n   \tflog,e := klog.NewFlog(klog.DEBUG, true, klog.Shanghai, dir, \"log\", 10*1024, 0777,format,task)\n    \tif e != nil{\n       \t    .... //Custom Operation\n   \t}\n\t// Analog output log\n\tfor {\n\t\tflog.Debug(\"DEBUG : %d + %d = %d\",1,2,1+2)\n\t\tflog.Error(\"ERROR\")\n\t\tflog.Warning(\"WARNING %p\",flog)\n\t\tflog.Info(\"INFO %s\",\"Hello LogKer.\")\n\t\ttime.Sleep(2 * time.Second)\n\t}\n}\n\n```\n\u003e 👆Parameter note List:\n```go\n\n// Build File logger\n// Args note\n// logLevel:    lev,       \\\\ logging level\n// wheError:    wheErr,    \\\\ whether enable  error alone file\n// directory:   dir,\t   \\\\ logging file save directory\n// fileName:    fileName,  \\\\ logging save file name\n// timeZone:    zone,\t   \\\\ load time zone format\n// power:       power,     \\\\ file system power\n// fileMaxSize: size,      \\\\ logging alone file max size\n// task := InitAsync(Qs1w) \\\\ createsABufferForCoroutineLogProcessing\n// format :\n\t// Now upgrade to version v 1.1.5 to customize the message output format ~\n\t// TheCustomTagNameMustBe {level} {time} {position} {message}\n\t// The location of the custom label is the location\n\t// where the program outputs the corresponding log message at run time！！！！\n\t// forExampleHereIsMyCustom\n\t// 1. //format := \"{level} - {time} - {position} - {message}\"\n```\n\n#### 2. Console Logger\n\n```go\n\npackage main\n\nimport (\n\t\"github.com/higker/logker\"\n\t\"strings\"\n)\n\n//type Formatting string\n\n// logKer library Test\nfunc main() {\n\t// Now upgrade to version v 1.1.5 to customize the message output format ~\n\t// TheCustomTagNameMustBe {level} {time} {position} {message}\n\t// The location of the custom label is the location\n\t// where the program outputs the corresponding log message at run time！！！！\n\t// forExampleHereIsMyCustom\n\t// 1. //format := \"{level} - {time} - {position} - {message}\"\n\tformat := \"{level} - 时间 {time}  - 位置 {position} - 消息 {message}\" //This version was modified from v 1.1.5\n    \t//Create Log Buffer\n    \ttask := InitAsync(Qs1w)\n\tlog,e := logker.NewClog(logker.DEBUG, logker.Shanghai, format,task)\n    \tif e != nil{\n        \t..... //Custom Operation\n    \t}\n\tlog.Debug(\"DEBUG %s\",\"自定义日志消息匹配符测试\")\n\tlog.Info(\"%v\", log)\n\tlog.Warning(\"%v\", logker.Shanghai)\n\tlog.Error(\"ERROR\")\n}\n```\n## OutPut\n```shell\n[ DEBUG ] - 时间 2020-04-20 11:57:23.8927  - 位置 main.go|main.main:23 - 消息 DEBUG 自定义日志消息匹配符测试\n[  INFO ] - 时间 2020-04-20 11:57:23.8928  - 位置 main.go|main.main:24 - 消息 \u0026{0 Asia/Shanghai 0xc00008e220 {level} - 时间 {t位置 {position} - 消息 {message}}\n[WARNING] - 时间 2020-04-20 11:57:23.8928  - 位置 main.go|main.main:25 - 消息 Asia/Shanghai\n[ ERROR ] - 时间 2020-04-20 11:57:23.8929  - 位置 main.go|main.main:26 - 消息 ERROR\n\n```\n#### 3. Effect:\n\u003e The screenshot is not updated ~ The current screenshot is v1.0.9 version,\n\u003e you can install the library yourself to see the effect.\n![LogKerGolang](https://i.loli.net/2020/04/18/Jjv82WDsyGtCaEH.png)\n\n![log,golang,logKer](https://i.loli.net/2020/04/18/mJnvBp7oXwd8KSU.png)\n\n## Thank list🤝\n- fatih (https://github.com/fatih/color)\n- Icon Mafia (Logo \u0026 Banner design)\n- When are you? 😜\n\n## Other \n- `Welcome to submit work order👏`\n- `Pkg Docs: `[click to pkg.go.dev](https://pkg.go.dev/github.com/higker/logker?tab=doc)\n## License\n\nThis project open source is MIT License\n. See the [LICENSE](LICENSE) file content.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauula%2Fsprout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauula%2Fsprout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauula%2Fsprout/lists"}