Skip to content
/ ink Public
forked from ivx/ink

A Logger backend that logs JSON

Notifications You must be signed in to change notification settings

nateless/ink

 
 

Repository files navigation

Ink

Ink is a backend for the Elixir Logger with two main purposes:

  • to log JSON documents instead of normal log lines
  • to filter secret strings out of the log lines

Installation

Just add :ink to your dependencies and run mix deps.get.

def deps do
  [{:ink, "~> 1.0"}]
end

Usage

The only thing you have to do is drop some lines into your config.

# this will add Ink as the only backend for Logger
config :logger,
  backends: [Ink]

# at least configure a name for your app
config :logger, Ink,
  name: "your app",
  io_device: "logs/log.json", rotate: %{max_bytes: 1048576000, keep: 5}

For more information on how to use Ink, take a look at the docs.

Maintenance

  • get dependencies with mix deps.get
  • execute tests with mix test
  • update dependencies with mix deps.update --all
  • execute tests again mix test

About

A Logger backend that logs JSON

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 99.0%
  • Other 1.0%