Table Flipper (╯°□°)╯︵ ┻━┻
TableFlipper is a useless package that prepends a table flip to Elixir error logs.
Inspired by iridakos/table_flipper.
Installation
Add this to your mix.exs:
def deps do
[
{:table_flipper, "~> 0.1.0"}
]
end
Afterwards update your config/config.exs file:
configure :logger,
backends: [TableFlipper]The table flip is only added for :error level logs.
Configuration
TableFlipper passes everything down to the default :console logger. So you can
just configure the console logger like you normally would. For example:
config :logger, :console,
format: "\n$time $metadata[$level] $message\n"will output the following:
iex> Logger.error fn -> "heeeeeyyyyy macarena!" end
12:09:16.179 [error] (╯°□°)╯︵ ┻━┻: heeeeeyyyyy macarena!
iex> Logger.info fn -> "nvm i don't like macarena" end
12:09:20.040 [info] nvm i don't like macarenawait a minute can't I just configure the logger?
Yep. I told you this was useless.
If you want to add the table flip to every level add the following to the
config/config.exs file:
config :logger, :console,
format: "\n(╯°□°)╯︵ ┻━┻: $time $metadata[$level] $levelpad$message\n"and you don't even need this package! If you just want to add it to error, though, you're probably better off using this. I don't know why, but I don't judge.
this is so useless I actually want to help
All contributions are welcome! Even if they are a PR to delete everything and end this nonsense.
- Fork it (https://github.com/fribmendes/table_flipper/fork)
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Feel free to make suggestions as well and to open an issue if you found some of them bugs.