Loggix

hex.pm versionhex.pm

CircleCI

using GenEvent.

Concept

Installation

If available in Hex, the package can be installed by adding loggix to your list of dependencies in mix.exs:

def deps do
  [{:loggix, "~> 0.0.8"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/loggix.

Configration

To configure loggix as app logger backend, set environments into config/config.exs.

config :logger,
  backends: [{Loggix, :error_log}]
config :logger, :error_log,
  path: "var/log/error_log",
  level: :error,
  encoder: {Poison, :encode!},
  metadata: [:user_id, :is_auth],
  rotate: %{max_bytes: 4096, keep: 6},
  metadata_filter: [:is_app]