{"id":27135515,"url":"https://github.com/oliverschlueter/sloki","last_synced_at":"2025-04-10T00:05:57.487Z","repository":{"id":286338042,"uuid":"961111314","full_name":"OliverSchlueter/sloki","owner":"OliverSchlueter","description":"A slog handler which sends logs to Loki","archived":false,"fork":false,"pushed_at":"2025-04-07T18:30:47.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T00:05:56.711Z","etag":null,"topics":["go","logging","loki","slog","structured-logging"],"latest_commit_sha":null,"homepage":"","language":"Go","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/OliverSchlueter.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}},"created_at":"2025-04-05T19:21:46.000Z","updated_at":"2025-04-07T18:30:51.000Z","dependencies_parsed_at":"2025-04-05T20:37:46.584Z","dependency_job_id":null,"html_url":"https://github.com/OliverSchlueter/sloki","commit_stats":null,"previous_names":["oliverschlueter/sloki"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliverSchlueter%2Fsloki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliverSchlueter%2Fsloki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliverSchlueter%2Fsloki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliverSchlueter%2Fsloki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OliverSchlueter","download_url":"https://codeload.github.com/OliverSchlueter/sloki/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131319,"owners_count":21052819,"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","logging","loki","slog","structured-logging"],"created_at":"2025-04-08T01:48:26.373Z","updated_at":"2025-04-10T00:05:57.458Z","avatar_url":"https://github.com/OliverSchlueter.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sloki\n\nA slog handler (for GoLang) which sends logs to Loki.\n\nYou can find a docker-compose file to run Loki and Grafana in the [loki_docker](loki_docker) directory. There is also an example dashboard for Grafana.\n\n## Installation\n\n```bash\ngo get github.com/OliverSchlueter/sloki\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"github.com/OliverSchlueter/sloki/sloki\"\n\t\"log/slog\"\n)\n\nfunc main() {\n\tlogger := sloki.NewService(sloki.Configuration{\n\t\tURL:          \"http://localhost:3100/loki/api/v1/push\",\n\t\tService:      \"my-service\",\n\t\tConsoleLevel: slog.LevelDebug,\n\t\tLokiLevel:    slog.LevelInfo,\n\t})\n\tslog.SetDefault(slog.New(logger))\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverschlueter%2Fsloki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliverschlueter%2Fsloki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverschlueter%2Fsloki/lists"}