Blabbermouth

A library for generating lots of logs.

Installation

The package can be installed by adding blabbermouth to your list of dependencies in mix.exs:

def deps do
  [
    {:blabbermouth, "~> 0.1.0"}
  ]
end

Add Blabbermouth to your application as a child:

  children = [
    {BlabberMouth, [interval: :timer.seconds(1), opts: [log_level: :error, message: "I spam you!", metadata: [user_id: 123]]]},
    ...
  ]

You can also initialize several Blabbermouths with different intervals, messages, levels, etc.

To make this easier, use the Blabbermouth.Gaggle module, which supervises a collection of Blabbermouths:

  children = [
    {Blabbermouth.Gaggle, [
      {Blabbermouth.Log, 5_000, log_level: :error},
      {Blabbermouth.Log, 1_000, log_level: :info}
    ]},
    ...
  ]

Configuration

The following options are available to be passed to Blabbermouth:

Blabbers

Blabbermouth.Log

Calls Logger.log and is configurable with a host of options: