{"id":32169601,"url":"https://github.com/jackjoe/ex_activity","last_synced_at":"2026-02-23T05:01:43.087Z","repository":{"id":57498470,"uuid":"103416370","full_name":"jackjoe/ex_activity","owner":"jackjoe","description":"Web app logging with Elixir and Ecto","archived":false,"fork":false,"pushed_at":"2017-09-29T10:13:05.000Z","size":57,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-21T16:44:23.942Z","etag":null,"topics":["ecto","elixir","phoenix-framework"],"latest_commit_sha":null,"homepage":"","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/jackjoe.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":"2017-09-13T15:21:04.000Z","updated_at":"2021-03-23T14:53:34.000Z","dependencies_parsed_at":"2022-09-06T16:22:27.949Z","dependency_job_id":null,"html_url":"https://github.com/jackjoe/ex_activity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jackjoe/ex_activity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackjoe%2Fex_activity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackjoe%2Fex_activity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackjoe%2Fex_activity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackjoe%2Fex_activity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackjoe","download_url":"https://codeload.github.com/jackjoe/ex_activity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackjoe%2Fex_activity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29664931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["ecto","elixir","phoenix-framework"],"created_at":"2025-10-21T16:32:37.280Z","updated_at":"2026-02-23T05:01:43.060Z","avatar_url":"https://github.com/jackjoe.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/jackjoe/ex_activity.svg)](https://travis-ci.org/jackjoe/ex_activity)\n\n# ExActivity\n\nWeb app logging as it was meant to be: non-blocking and abundant\\*\n\n###### \\* non-blocking means: in a separate Elixir Task.\n\n## What?\n\nWeb applications have a lot going on, and you want to be in control of the flow. Logging is crucial, but logging too much will slow down those µ-second response times! Not with Elixir and\nExActivity! It logs activity to your database in a non-blocking way, using Ecto. You have control what you log, in a structured way.\n\n## Installation\n\n### Setup\n\nAdd `ex_activity` and your Ecto database adapter to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ex_activity, \"~\u003e 0.2.0\"},\n    {:mariaex, \"~\u003e 0.8.2\"} # you can use any other Ecto adapter here\n  ]\nend\n```\nThen run `mix deps.get` to fetch the dependencies.\n\nNext provide configuration for the repo ExActivity will use:\n\n```elixir\nconfig :ex_activity, ExActivity.Repo,\n  adapter: Ecto.Adapters.MySQL, # or use postgres\n  username: \"sqluser\",\n  password: \"\",\n  database: \"app_db\",\n  hostname: \"localhost\",\n```\n\n### Migrate\n\nThe repo contains two migration files to setup your db. Just copy them to your own `priv/repo/migrations` folder and run:\n\n`mix ecto.migrate`\n\n\u003e Note: using other adapters than `MySQL` has not been thoroughly tested. Although once setup we use no proprietary query syntax, the migrations you can run to get your db ready using the mix tasks *are* MySQL specific. This in on our TODO list.\n\n## Usage\n\nProvide a filled out `ExActivity.Log` struct and pass it to the log method:\n\n```elixir\nExActivity.log(%ExActivity.Log{\n  type: \"api_call\",\n  action: \"UserController/list\" ,\n  result: \"user_count: 10\"\n})\n```\n\n### Properties\n  * `type` - gives more context about the action you are logging; it could be the name of the controller where you log from, the context, ...\n  * `action` - method name, sub-action in method, ...\n  * `result` - outcome of the action such as ERROR, SUCCESS, WRONG_CODE, ...\n  * `details` - more like meta date about current state\n  * `data` - raw data, request parameters, db result, ...\n\n  _For now everything should be string or integer (for some fields), we will try to expand this to accept more data/struct like structures, and encode them to JSON._\n\n## Documentation\n\nThe docs can be found at [https://hexdocs.pm/ex_activity](https://hexdocs.pm/ex_activity).\n\n## Why? Use `:logger` already!\n\nWe are new to the Phoenix/Elixir club, and were set in our ways when it comes to logging. We prefer to log important actions to a database, in a unified way. While we use the default Elixir logger to log general stuff to services like PaperTrail, we needed something more. We used ActivityLog in Laravel before, so we made ExActivity.\n\n## TODO\n\n  - [x] improve documentation\n  - [x] ip / user_agent from conn\n  - [ ] make migrations adapter agnostic (LONGTEXT)\n  - [ ] run migrations when installing\n  - [x] extend docs with more information\n\n## License\n\nExActivity is Copyright © 2017 Jack+Joe. It is free software, and may be\nredistributed under the terms specified in the [LICENSE](/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackjoe%2Fex_activity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackjoe%2Fex_activity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackjoe%2Fex_activity/lists"}