{"id":13508494,"url":"https://github.com/marcelog/logger_logstash_backend","last_synced_at":"2025-04-07T09:19:48.276Z","repository":{"id":33733912,"uuid":"37388442","full_name":"marcelog/logger_logstash_backend","owner":"marcelog","description":"Logstash backend for the Elixir Logger","archived":false,"fork":false,"pushed_at":"2019-04-01T09:13:24.000Z","size":36,"stargazers_count":72,"open_issues_count":11,"forks_count":40,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T07:08:31.229Z","etag":null,"topics":["elixir","elixir-logger","logger","logstash","udp"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcelog.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":"2015-06-13T21:26:14.000Z","updated_at":"2025-01-23T23:57:37.000Z","dependencies_parsed_at":"2022-09-16T19:33:55.736Z","dependency_job_id":null,"html_url":"https://github.com/marcelog/logger_logstash_backend","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Flogger_logstash_backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Flogger_logstash_backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Flogger_logstash_backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Flogger_logstash_backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelog","download_url":"https://codeload.github.com/marcelog/logger_logstash_backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622983,"owners_count":20968575,"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":["elixir","elixir-logger","logger","logstash","udp"],"created_at":"2024-08-01T02:00:53.900Z","updated_at":"2025-04-07T09:19:48.258Z","avatar_url":"https://github.com/marcelog.png","language":"Elixir","funding_links":[],"categories":["Logging"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/marcelog/logger_logstash_backend.svg)](https://travis-ci.org/marcelog/logger_logstash_backend)\n\nLoggerLogstashBackend\n=====================\n\n## About\nA backend for the [Elixir Logger](http://elixir-lang.org/docs/v1.0/logger/Logger.html)\nthat will send logs to the [Logstash UDP input](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-udp.html).\n\n## Supported options\n\n * **host**: String.t. The hostname or ip address where to send the logs.\n * **port**: Integer. The port number. Logstash should be listening with its UDP\n inputter.\n * **metadata**: Keyword.t. Extra fields to be added when sending the logs. These will\n be merged with the metadata sent in every log message.\n * **level**: Atom. Minimum level for this backend.\n * **type**: String.t. Type of logs. Useful to filter in logstash.\n\n## Sample Logstash config\n```\ninput {\n  udp {\n    codec =\u003e json\n    port =\u003e 10001\n    queue_size =\u003e 10000\n    workers =\u003e 10\n    type =\u003e default_log_type\n  }\n}\noutput {\n  stdout {}\n  elasticsearch {\n    protocol =\u003e http\n  }\n}\n```\n\n## Using it with Mix\n\nTo use it in your Mix projects, first add it as a dependency:\n\n```elixir\ndef deps do\n  [{:logger_logstash_backend, \"~\u003e 3.0.0\"}]\nend\n```\nThen run mix deps.get to install it.\n\nAdd logger and tzdata as applications:\n\n```elixir\ndef application do\n  [applications: [:logger, :timex]]\nend\n```\n\n## Configuration Examples\n\n### Runtime\n\n```elixir\nLogger.add_backend {LoggerLogstashBackend, :debug}\nLogger.configure {LoggerLogstashBackend, :debug},\n  host: \"127.0.0.1\",\n  port: 10001,\n  level: :debug,\n  metadata: ...\n```\n\n### Application config\n\n```elixir\nconfig :logger,\n  backends: [{LoggerLogstashBackend, :error_log}, :console]\n\nconfig :logger, :error_log,\n  host: \"some.host.com\",\n  port: 10001,\n  level: :error,\n  type: \"my_type_of_app_or_node\",\n  metadata: [\n    extra_fields: \"go here\"\n  ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2Flogger_logstash_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelog%2Flogger_logstash_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2Flogger_logstash_backend/lists"}