[Proposal] Add option for all schema fields to be excluded from Inspect and JSON encoding

56 views
Skip to first unread message

Noah Betzen

unread,
Apr 1, 2025, 10:59:24 PMApr 1
to elixir-ecto
In order to help prevent excess logging of fields, it might be useful to allow either:

1. A application config setting for a repo to redact all fields by default. As an example:
```
config :friends, Friends.Repo,
  database: "friends",
  redact: :all
```

and/or

2. A schema attribute that does the same. As an example:
```
@redact :all
schema "users" do
  # ...
end
```

I assume the implementation would be somewhere in these files:
Reply all
Reply to author
Forward
0 new messages