{"id":16611408,"url":"https://github.com/shufo/log_viewer","last_synced_at":"2025-07-03T07:05:56.265Z","repository":{"id":33278081,"uuid":"157288506","full_name":"shufo/log_viewer","owner":"shufo","description":"An Web based Log Viewer for Elixir and Phoenix","archived":false,"fork":false,"pushed_at":"2023-12-15T20:09:43.000Z","size":1318,"stargazers_count":58,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-29T05:58:06.411Z","etag":null,"topics":["elixir","phoenix"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/log_viewer","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shufo.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-11-12T22:53:47.000Z","updated_at":"2024-10-19T01:51:52.000Z","dependencies_parsed_at":"2023-12-15T21:37:50.332Z","dependency_job_id":"1a6cf4e4-684f-42be-ac48-0dd2b60d5bbf","html_url":"https://github.com/shufo/log_viewer","commit_stats":{"total_commits":60,"total_committers":2,"mean_commits":30.0,"dds":"0.30000000000000004","last_synced_commit":"90acac4f178160e411ffdfde30980f79cf51a6ec"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shufo/log_viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Flog_viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Flog_viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Flog_viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Flog_viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shufo","download_url":"https://codeload.github.com/shufo/log_viewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shufo%2Flog_viewer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263279270,"owners_count":23441681,"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","phoenix"],"created_at":"2024-10-12T01:37:22.052Z","updated_at":"2025-07-03T07:05:56.244Z","avatar_url":"https://github.com/shufo.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Tests](https://github.com/shufo/log_viewer/workflows/Tests/badge.svg)\n[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026repo=shufo/log_viewer)](https://dependabot.com)\n\n# LogViewer\n\nAn Web based Log Viewer for Elixir and Phoenix\n\n## Overview\n\n\u003ca href=\"https://i.imgur.com/WPAhlCS.png\"\u003e\u003cimg src=\"https://i.imgur.com/WPAhlCS.png\" width=\"800\"\u003e\u003c/a\u003e\n\n### Features\n\n- :mag: Filtering logs with level and search word\n- :fast_forward: Realtime Update\n- :rainbow: Syntax Highlighted logs\n- Phoenix 1.3 \u0026 1.4 supported\n\n![Imgur](https://i.imgur.com/0qj93i4.gif)\n\n## Installation\n\n`mix.exs`\n\n```elixir\ndef deps do\n  [\n    {:log_viewer, \"~\u003e 0.1.0\", only: [:dev]}\n  ]\nend\n```\n\nLog Viewer is mainly focused on development purpose. So in production environment, please consider to using Log Management platform like AWS CloudWatch Logs, Papertrail and timber.\n\n## Configuration\n\nAdd `{LogViewer.Logger, []}` to your logger backends\n\n```elixir\nconfig :logger,\n  backends: [{LogViewer.Logger, []}, :console]\n```\n\nthen start your application and open http://localhost:5900\n\n```bash\n$ ➜ iex -S mix\nErlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [hipe]\n\n05:51:25.379 [info]  Log Viewer started listening on http://localhost:5900\nInteractive Elixir (1.7.4) - press Ctrl+C to exit (type h() ENTER for help)\n```\n\nthen output logs by Logger\n\n```elixir\niex\u003e require Logger\niex\u003e Logger.info(\"foo\")\niex\u003e Logger.debug(\"foo\")\niex\u003e Logger.warn(\"foo\")\niex\u003e Logger.error(\"foo\")\n```\n\n![Imgur](https://i.imgur.com/4wNB2TZ.png)\n\n## Usage\n\n### Phoenix Integration\n\nBasically Log Viewer can works as standalone elixir app.\n\nBut you can also integrate Log Viewer with Phoenix as well.\n\n1. Add route for Log Viewer\n\n`router.ex`\n\n```elixir\nscope \"/\" do\n  pipe_through(:browser)\n  get(\"/\", MyAppWeb.PageController, :index)\nend\n\n# Route for Log Viewer\nforward(\"/log_viewer\", LogViewer.Router)\n```\n\n### Cowboy\n\n:exclamation: Phoenix depends [Cowboy](https://github.com/ninenines/cowboy) HTTP server and Cowboy 2.0 had breaking change, so you must change configuration according to Phoenix and Cowboy version.\n\n#### For Phoenix 1.3 users\n\n`endpoint.ex`\n\n```elixir\nsocket(\"/log_viewer\", LogViewer.PhoenixSocket)\n```\n\n:exclamation:️ This path **MUST** same with the path you defined in router.\n\n#### For Phoenix 1.4 \u0026 Cowboy 1.0 users\n\nThis case is for if you have upgraded Phoenix 1.3 to 1.4 and still using cowboy 1.0\n\n`endpoint.ex`\n\n```elixir\nsocket \"/log_viewer\", LogViewer.PhoenixSocket,\n    websocket: true,\n    longpoll: false\n```\n\n#### For Phoenix 1.4 \u0026 Cowboy 2.0 users\n\n`config/config.exs`\n\nPlease **CHANGE** app name to your app name. (`:my_app`, `MyAppWeb`)\n\n```elixir\nconfig :my_app, MyAppWeb.Endpoint,\n  http: [\n    dispatch: [\n      {:_,\n       [\n         {\"/log_viewer/websocket\", LogViewer.WebSocketHandler, []},\n         {:_, Phoenix.Endpoint.Cowboy2Handler, {MyAppWeb.Endpoint, []}}\n       ]}\n    ]\n  ]\n```\n\nthen start the phoenix and open http://localhost:4000/log_viewer in browser to view Log Viewer\n\n![Imgur](https://i.imgur.com/QSHd8Dx.png)\n\n### Standalone mode\n\nIf you are using phoenix integration and standalone server is not necessary, you can disable standalone server. Defaults to `true`.\n\n`config/config.exs`\n\n```elixir\nconfig :log_viewer, standalone: false\n```\n\n### Standalone server port\n\nIf you want to change standalone server port. Defaults to `5900`.\n\n`config/config.exs`\n\n```elixir\nconfig :log_viewer, port: 4002\n```\n\n### Log Level\n\nYou can set log level. Defaults to `:all`.\n\nThis config results to only info level log\n\n`config/config.exs`\n\n```elixir\nconfig :log_viewer, level: :info\n```\n\n## Tips\n\nUse `inspect/2` with `pretty: true` option will outputs pretty-printed logs\n\n```elixir\nself() |\u003e Process.info() |\u003e inspect(pretty: true) |\u003e Logger.info()\n```\n\n![Imgur](https://i.imgur.com/yls6AC0.png)\n\n## Contributing\n\n1.  Fork it\n2.  Create your feature branch (`git checkout -b my-new-feature`)\n3.  Commit your changes (`git commit -am 'Add some feature'`)\n4.  Push to the branch (`git push origin my-new-feature`)\n5.  Create new Pull Request\n\n## Test\n\n1. Clone this repo\n2. `mix deps.get \u0026\u0026 iex -S mix`\n3. Open another window to run nuxt.js\n4. `cd src \u0026\u0026 npm install \u0026\u0026 npm run dev`\n\n## TODO\n\n- [ ] Log Persistence\n- [ ] Configurable Syntax Highlight theme\n- [ ] Performance Improvement\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshufo%2Flog_viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshufo%2Flog_viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshufo%2Flog_viewer/lists"}