{"id":22974048,"url":"https://github.com/bolcom/log15-redis-handler","last_synced_at":"2025-08-09T23:11:48.769Z","repository":{"id":57497559,"uuid":"81960320","full_name":"bolcom/log15-redis-handler","owner":"bolcom","description":"handler for the log15 package that sends JSON messages in Logstash format to a Redis queue","archived":false,"fork":false,"pushed_at":"2017-02-20T08:11:36.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T07:28:05.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bolcom.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":"2017-02-14T15:37:19.000Z","updated_at":"2020-02-09T22:57:13.000Z","dependencies_parsed_at":"2022-09-03T23:20:39.373Z","dependency_job_id":null,"html_url":"https://github.com/bolcom/log15-redis-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bolcom/log15-redis-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flog15-redis-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flog15-redis-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flog15-redis-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flog15-redis-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bolcom","download_url":"https://codeload.github.com/bolcom/log15-redis-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flog15-redis-handler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269649848,"owners_count":24453541,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"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":[],"created_at":"2024-12-14T23:59:57.322Z","updated_at":"2025-08-09T23:11:48.743Z","avatar_url":"https://github.com/bolcom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log15-redis-handler (package redis15)\n\t\n[![Build Status](https://travis-ci.org/bolcom/log15-redis-handler.png)](https://travis-ci.org/bolcom/log15-redis-handler)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bolcom/log15-redis-handler)](https://goreportcard.com/report/github.com/bolcom/log15-redis-handler)\n[![GoDoc](https://godoc.org/github.com/bolcom/log15-redis-handler?status.svg)](https://godoc.org/github.com/bolcom/log15-redis-handler)\n\n## How to send log messages to Logstash via Redis\n\n\tpackage main\n\n\timport (\n\t\t\"os\"\n\n\t\tredis15 \"github.com/bolcom/log15-redis-handler\"\n\t\t\"github.com/inconshreveable/log15\"\n\t)\n\n\tfunc main() {\n\t\tlogger := log15.New()\n\t\tf := redis15.LogstashFormat{}\n\t\tf.Application = \"daxy\"\n\t\tf.Role = \"webservice\"\n\t\tf.Instance = \"ps34\"\n\t\tf.SourceHost = \"MacErnest\"\n\t\tf.Pretty = true // e.g. hook to verbose flag\n\n\t\tredisHandler , _ := NewRedisHandler([]string{\"localhost:6379}, \"logs\", f) \n\t\t// must handle err\n\n\t\tlogger.SetHandler(redisHandler)\n\t\tlogger.Debug(\"hello\", \"pi\", 3.14)\n\t}\n\nExample output\n\n\t{\n\t\t\t\"@source_host\": \"MacErnest\",\n\t\t\t\"@timestamp\": \"2017-02-17T09:57:37.028587577+01:00\",\n\t\t\t\"@fields\": {\n\t\t\t\t\t\"application\": \"daxy\",\n\t\t\t\t\t\"file\": \"redis15.go\",\n\t\t\t\t\t\"instance\": \"ps34\",\n\t\t\t\t\t\"level\": \"DEBUG\",\n\t\t\t\t\t\"line\": \"22\",\n\t\t\t\t\t\"pi\": \"3.14\",\n\t\t\t\t\t\"role\": \"webservice\"\n\t\t\t},\n\t\t\t\"@message\": \"hello\"\n\t}\n\nNote that most values are converted to a String. \nUse NoStringConvert on the LogstashFormat value to specify the exceptions.\nFor application logging, the `logtype`, `level` and `message` are reserved.\n\n© 2017 bol.com. Apache v2 Licensed. Contributions are welcome.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolcom%2Flog15-redis-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolcom%2Flog15-redis-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolcom%2Flog15-redis-handler/lists"}