{"id":32166699,"url":"https://github.com/alvivi/logger_iex_backend","last_synced_at":"2026-02-21T18:02:05.649Z","repository":{"id":57517888,"uuid":"206839807","full_name":"alvivi/logger_iex_backend","owner":"alvivi","description":"An Elixir Logger Backend for IEx interactive sessions","archived":false,"fork":false,"pushed_at":"2019-09-08T20:34:52.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-14T18:41:04.996Z","etag":null,"topics":["elixir","elixir-lang","logger"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/alvivi.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}},"created_at":"2019-09-06T17:06:53.000Z","updated_at":"2022-11-19T23:24:38.000Z","dependencies_parsed_at":"2022-09-26T18:01:33.221Z","dependency_job_id":null,"html_url":"https://github.com/alvivi/logger_iex_backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alvivi/logger_iex_backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvivi%2Flogger_iex_backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvivi%2Flogger_iex_backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvivi%2Flogger_iex_backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvivi%2Flogger_iex_backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvivi","download_url":"https://codeload.github.com/alvivi/logger_iex_backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvivi%2Flogger_iex_backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29689644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["elixir","elixir-lang","logger"],"created_at":"2025-10-21T15:09:36.635Z","updated_at":"2026-02-21T18:02:05.644Z","avatar_url":"https://github.com/alvivi.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/alvivi/logger_iex_backend.svg?branch=master)](https://travis-ci.org/alvivi/logger_iex_backend)\n[![Coverage Status](https://coveralls.io/repos/github/alvivi/logger_iex_backend/badge.svg?branch=master)](https://coveralls.io/github/alvivi/logger_iex_backend?branch=master)\n[![Docs](https://img.shields.io/badge/hex-1.0.0-success)](https://hexdocs.pm/logger_iex_backend/1.0.0/LoggerIexBackend.html)\n\n# LoggerIexBackend\n\n*LoggerIexBackend* is a\n[Logger Backend](https://hexdocs.pm/logger/master/Logger.html#module-backends)\nfor [IEx](https://hexdocs.pm/iex/IEx.html) interactive sessions.\n\nIf you have run into an *IEx* session of an Elixir application that makes\nexhaustive use of standard output logging, you probably have found a mostly\nunusable interactive shell. This is usually solved disabling logging, increasing\nlogger lever or using an alternative backend like\n[LoggerFileBackend](https://github.com/onkel-dirtus/logger_file_backend).\n\n*LoggerIexBackend* solves this problem and also enables logging debugging\nwith tools like logs filtering and dynamic log configuration.\n\n\n## Example\n\nGiven the following code example:\n\n```elixir\ndefmodule Example do\n  require Logger\n\n  def foo() do\n    Logger.debug(\"A foo message\")\n  end\n\n  defmodule Bar do\n    require Logger\n\n    def bar() do\n      Logger.info(\"A bar message\")\n    end\n  end\nend\n```\n\nWe can use *LoggerIexBackend* in a interactive shell like this:\n\n```none\niex\u003e Example.foo()\n00:00:01.000 [debug] A foo message\n:ok\niex\u003e LoggerIexBackend.start()\n{:ok, #PID\u003c0.42.0\u003e}\niex\u003e Example.foo()\n:ok # NOTE that by default, all logs are disabled by LoggerIexBackend\niex\u003e LoggerIexBackend.set_rules(allow: :info)\n:ok\niex\u003e Example.foo()\n:ok # No logs here yet\niex\u003e Example.Bar.bar()\n:ok\n00:00:02.000 [info]  A bar message\niex\u003e LoggerIexBackend.set_rules(allow: ~r/foo/) # Enable logs by message\niex\u003e LoggerIexBackend.set_rules(allow: [module: Example]) # Enable logs by module\n:ok\niex\u003e Example.foo()\n:ok\n00:00:03.000 [debug] A foo message\n```\n\n## Using LoggerIexBackend with IEx\n\nTo use LoggerIexBackend in your projects, first add LoggerIexBackend as a\ndependency.\n\n```elixir\ndef deps do\n  [\n    {:ex_doc, \"~\u003e 1.0\", only: :dev}\n  ]\nend\n```\n\nThen, after installing the library using `mix deps.get` we have call\n`LoggerIexBackend.start/0` to start using it.\n\nWe can also enable *IEx* log backend by default in interactive shell sessions of\nour projects using `.iex.exs`:\n\n```elixir\nif :erlang.function_exported(LoggerIexBackend, :start, 0) do\n  LoggerIexBackend.start()\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvivi%2Flogger_iex_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvivi%2Flogger_iex_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvivi%2Flogger_iex_backend/lists"}