https://github.com/san650/pretty_print_formatter
Pretty Print Formatter for Elixir Logger module -- Colorize Ecto's SQL ouput :paintbrush:
https://github.com/san650/pretty_print_formatter
ecto elixir formatter logger phoenix pretty-printer
Last synced: 6 months ago
JSON representation
Pretty Print Formatter for Elixir Logger module -- Colorize Ecto's SQL ouput :paintbrush:
- Host: GitHub
- URL: https://github.com/san650/pretty_print_formatter
- Owner: san650
- License: mit
- Created: 2018-07-17T23:15:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-03T01:18:56.000Z (over 5 years ago)
- Last Synced: 2025-04-24T15:03:59.829Z (6 months ago)
- Topics: ecto, elixir, formatter, logger, phoenix, pretty-printer
- Language: Elixir
- Size: 311 KB
- Stars: 23
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pretty_print_formatter
[](https://travis-ci.org/san650/pretty_print_formatter)
[](https://coveralls.io/github/san650/pretty_print_formatter?branch=master)
Elixir library for coloring the output of the logger. Right now it colorizes Ecto SQL statements and Phoenix's request id metadata.
The idea is to use colors as a way to help developers to spot easier in the console what's happening quickly.
## Documentation
Documentation can be found at [https://hexdocs.pm/pretty_print_formatter](https://hexdocs.pm/pretty_print_formatter).
## Installation
[Available in Hex](https://hex.pm/packages/pretty_print_formatter), the package can be installed
by adding `pretty_print_formatter` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:pretty_print_formatter, "~> 0.1.0"}
]
end
```After installing the dependency you need to update the config/dev.exs
configuration file and set the new formatter.```elixir
config :logger, :console, format: {PrettyPrintFormatter, :write}
```### Ecto formatter configuration
To display the complete list of fields on queries you can configure `short_params_list` to `false`:```elixir
config :pretty_print_formatter, :ecto,
short_params_list: false
```## License
pretty_print_formatter is licensed under the MIT license.
See [LICENSE](./LICENSE) for the full license text.