{"id":50876523,"url":"https://github.com/marsxuefeng/tencent-cls","last_synced_at":"2026-06-15T10:03:12.017Z","repository":{"id":105286254,"uuid":"364278753","full_name":"marsxuefeng/tencent-cls","owner":"marsxuefeng","description":"腾讯云CLS接入log4j/logback，基于CLS APi的方式采集开发者应用日志","archived":false,"fork":false,"pushed_at":"2021-05-05T13:10:23.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-05T11:47:47.900Z","etag":null,"topics":["elasticsearch","elk","elk-stack","kibana","logging"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marsxuefeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-04T14:13:15.000Z","updated_at":"2021-05-05T13:10:25.000Z","dependencies_parsed_at":"2023-05-22T07:45:41.262Z","dependency_job_id":null,"html_url":"https://github.com/marsxuefeng/tencent-cls","commit_stats":null,"previous_names":["marsxuefeng/tencent-cls"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/marsxuefeng/tencent-cls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsxuefeng%2Ftencent-cls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsxuefeng%2Ftencent-cls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsxuefeng%2Ftencent-cls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsxuefeng%2Ftencent-cls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marsxuefeng","download_url":"https://codeload.github.com/marsxuefeng/tencent-cls/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsxuefeng%2Ftencent-cls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34357284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["elasticsearch","elk","elk-stack","kibana","logging"],"created_at":"2026-06-15T10:03:11.173Z","updated_at":"2026-06-15T10:03:11.954Z","avatar_url":"https://github.com/marsxuefeng.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### 腾讯云CLS接入log4j/Logback\n\n\n#### 腾讯云CLS提供了两种日志采集方式：\n- LogListener基于监听CVM日志文件实现日志采集\n- API采集，需要日志框架自动向CLS主动报备（本项目基于日志框架主动向CLS报备达到日志采集的目的）\n\n#### 开发者需要修改的文件：\n- src/main/resources/logback.xml\n- src/main/resources/log4j.properties\n替换以上两个文件中的secretId，secretKey，topicId，这三个字段在腾讯云CLS控制台获取\n\n#### 体验步骤：\n- 替换上述配置文件中的上述字段\n- 在腾讯云控制台创建CLS主题，并且将主题id配置到logback.xml，log4j.properties文件中\n- 运行com.github.cls.example.Log4jAppenderExample和com.github.cls.example.LogbackAppenderExample\n- 登陆腾讯云CLS控制台验证报备上来的日志信息\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarsxuefeng%2Ftencent-cls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarsxuefeng%2Ftencent-cls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarsxuefeng%2Ftencent-cls/lists"}