{"id":13410731,"url":"https://github.com/codeadict/lager_logentries","last_synced_at":"2025-10-21T18:45:41.122Z","repository":{"id":57514898,"uuid":"171089202","full_name":"codeadict/lager_logentries","owner":"codeadict","description":"Backend for Lager which sends logs to Logentries (https://logentries.com) via Token TCP.","archived":false,"fork":false,"pushed_at":"2020-06-24T05:43:33.000Z","size":38,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-16T11:22:41.377Z","etag":null,"topics":["erlang","erlang-library","lager","logentries","logging"],"latest_commit_sha":null,"homepage":"","language":"Erlang","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/codeadict.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-17T06:21:49.000Z","updated_at":"2020-06-24T05:43:35.000Z","dependencies_parsed_at":"2022-09-16T23:41:21.956Z","dependency_job_id":null,"html_url":"https://github.com/codeadict/lager_logentries","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/codeadict%2Flager_logentries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadict%2Flager_logentries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadict%2Flager_logentries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadict%2Flager_logentries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeadict","download_url":"https://codeload.github.com/codeadict/lager_logentries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610420,"owners_count":20318958,"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":["erlang","erlang-library","lager","logentries","logging"],"created_at":"2024-07-30T20:01:08.728Z","updated_at":"2025-10-21T18:45:41.042Z","avatar_url":"https://github.com/codeadict.png","language":"Erlang","readme":"# lager_logentries\n\nBackend for Lager which sends logs to [Logentries](https://logentries.com)  via [Token TCP](https://docs.logentries.com/docs/input-token)\n\n__Version:__ 0.1.0\n\n[![Hex.pm](https://img.shields.io/hexpm/v/lager_logentries.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/lager_logentries)\n[![Hex.pm](https://img.shields.io/hexpm/dt/lager_logentries.svg?maxAge=2592000)](https://hex.pm/packages/lager_logentries)\n[![Build Status](https://travis-ci.org/codeadict/lager_logentries.svg?branch=master)](https://travis-ci.org/codeadict/lager_logentries)\n\n## Installation\n\nThis library is [available on Hex](https://hex.pm/packages/lager_logentries). Just add it to your\nRebar3 dependencies:\n\n```erlang\n{deps, [\n  {lager_logentries, \"0.1.0\"}\n]}.\n```\n\n## Configuration\n\n**Supported options:**\n\n* **host:** The hostname of the logentries endpoint. (default: `data.logentries.com`)\n* **port:** The port number for logentries. (default: `80`)\n* **address_family:** Defines an specific IP protocol version. `inet` stands for IPv4, `inet6` for IPv6, and `undefined` means that suitable version will be chosen for you automatically. (default: `undefined`)\n* **token:** The unique logentries token (UUID) for the log destination.\n* **level:** Minimum level for this backend. (default: `info`)\n* **context:** Proplist of additional fields to be added when sending the logs. Keys have to be either atoms, binaries or iolists and values must be anything that has an equivalent JSON datatype. (e.g. `[{\u003c\u003c\"username\"\u003e\u003e, \u003c\u003c\"codeadict\"\u003e\u003e}, {\u003c\u003c\"environment\"\u003e\u003e, \u003c\u003c\"production\"\u003e\u003e}]`)\n\nAdd configuration to `sys.config`:\n\n```erlang\n{lager, [{ handlers,\n  [{ lager_logentries_token_tcp_backend,\n    [\n      {host, \"data.logentries.com\"},\n      {port, 80},\n      {token, \"2bfbea1e-10c3-4419-bdad-7e6435882e1f\"},\n      {level, info},\n      {context, [{\u003c\u003c\"username\"\u003e\u003e, \u003c\u003c\"codeadict\"\u003e\u003e}]}\n    ]\n  }]\n}]}\n```\n\n## Usage\n\n```erlang\n-module(example).\n\n-export([main/0]).\n\nmain() -\u003e\n  lager:info([{service, \"mycoolapp\"}], \"Hello ~s\", [\"world\"]).\n```\n\nWould result in JSON like this:\n\n```javascript\n{\n  \"message\": \"Hello world\",\n  \"timestamp\": \"2019-02-17T02:40:33.916880\",\n  \"fields\": {\n    \"severity\": \"info\",\n    \"service\": \"mycoolapp\",\n    \"application\": \"example\",\n    \"node\": \"node@localhost\",\n    \"pid\": \"\u003c0.13919.0\u003e\",\n    \"module\": \"example\",\n    \"function\": \"main\",\n    \"line\": \"6\"\n  }\n}\n```\n\n## Contributing\n\nPull requests are most welcome. If you have any questions, bug reports or feature proposals just\n[open an issue](https://github.com/codeadict/lager_logentries/issues/new).\n\nThe project is developed using rebar3:\n\n* run `rebar3 compile` to compile the source code\n* run `rebar3 ct` to test it\n* run `rebar3 dialyzer` to perform Dialyzer checks\n\n**Note:** Any new piece of code should be reasonably tested and covered by type specs.\n\n## License\n\nCopyright 2019 Dairon Medina Caro\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":["Monitoring \u0026 Observability"],"sub_categories":["Telegram"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeadict%2Flager_logentries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeadict%2Flager_logentries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeadict%2Flager_logentries/lists"}