Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Adz /ӕdz/

NOTE: Adz is no longer being developed. You should probably just use Elixir's Logger directly.

  1. Noun: A woodworking tool used for smoothing or carving timbers.
  2. Noun: A formatting library for Elixir's Logger.

Adz's primary contribution is transparently adding module name and line number to Elixir's Logger output. It can also format logs as valid JSON or plain text.

Getting adz

Add adz to the deps section of mix.exs:

{:adz, github: "operable/adz"}

Configuring adz output

JSON

config :logger, :console,
  metadata: [:module, :line],
  format: {Adz, :json}

Example output (line breaks and indentation added for readability):

{"timestamp":"2016-02-22T13:36:32.0838",
 "source":"Cog.Command.RuleCache",
 "message":"Ready. Command rule cache TTL is 10 seconds.",
 "line":33,
 "level":"info"}

Text

config :logger, :console,
  metadata: [:module, :line],
  format: {Adz, :text}

Example output:

2016-02-22T13:36:32.0838  (Cog.Command.RuleCache:33) [info] Ready. Command rule cache TTL is 10 seconds.

About

A tool for shaping logs

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.