{"id":21967406,"url":"https://github.com/keke-li/log","last_synced_at":"2025-04-24T05:33:17.979Z","repository":{"id":45135677,"uuid":"249380800","full_name":"KeKe-Li/log","owner":"KeKe-Li","description":"log for service","archived":false,"fork":false,"pushed_at":"2022-01-06T01:37:56.000Z","size":62,"stargazers_count":18,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T07:22:28.537Z","etag":null,"topics":["go","log"],"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/KeKe-Li.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-03-23T08:58:01.000Z","updated_at":"2024-06-24T12:13:44.000Z","dependencies_parsed_at":"2022-08-26T08:50:22.028Z","dependency_job_id":null,"html_url":"https://github.com/KeKe-Li/log","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/KeKe-Li%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeKe-Li%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeKe-Li%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeKe-Li%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeKe-Li","download_url":"https://codeload.github.com/KeKe-Li/log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250572638,"owners_count":21452334,"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":["go","log"],"created_at":"2024-11-29T13:26:27.404Z","updated_at":"2025-04-24T05:33:17.935Z","avatar_url":"https://github.com/KeKe-Li.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### go log system\n\n\u003cp align='left'\u003e\n\u003cimg src=\"https://img.shields.io/badge/build-passing-brightgreen.svg\"\u003e\n\u003ca href=\"https://twitter.com/perfactsen\"\u003e\u003cimg src=\"https://img.shields.io/badge/twitter-keke-green.svg?style=flat\u0026colorA=009df2\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.zhihu.com/people/sencoed.com/activities\"\u003e\u003cimg src=\"https://img.shields.io/badge/%E7%9F%A5%E4%B9%8E-keke-green.svg?style=flat\u0026colorA=009df2\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nlog is a powerful logging framework that provides log custom log level.\n\nlog provides Fatal, Error, Warn, Info, Debug level log. and with the requestID can quickly go to the current line of code.\n\nIf you like，please give a star。\n\n#### How to Use\n\nit's very simple and easy to use.\n\n```go\nfunc main(){\n\tl := log.New(log.WithTraceId(trace.NewTraceId()))\n\tctx := log.NewContext(context.Background(), l)\n\t\n\tv, err := rand.Int(rand.Reader, big.NewInt(int64(16)))\n    \tif err != nil {\n    \t\tlog.ErrorContext(ctx, \" rand.In failed\", \"error\", err.Error())\n    \t\treturn \n    \t}\n\tlog.InfoContext(ctx, \"the rand Int result\", \"v\", v)\n}\n```\n\nThis use is made of the key and the Value output.\n\n### License\n\nThis is free software distributed under the terms of the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeke-li%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeke-li%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeke-li%2Flog/lists"}