summaryrefslogtreecommitdiff
path: root/lib/poolparty/pool/supervisor.ex
diff options
context:
space:
mode:
authorkballou <kballou@devnulllabs.io>2014-10-20 16:30:10 -0600
committerkballou <kballou@devnulllabs.io>2014-10-20 16:30:10 -0600
commit482e23b272bbb5221e09634c16ab0be9edd40592 (patch)
treed319add510ab527680866ffaeb1569b6572c694c /lib/poolparty/pool/supervisor.ex
parentb50ed8072e6bc9aaa342f30520e979a38cc5370f (diff)
downloadpoolparty-482e23b272bbb5221e09634c16ab0be9edd40592.tar.gz
poolparty-482e23b272bbb5221e09634c16ab0be9edd40592.tar.xz
Add logging to pool party
Add basic debug logging to the pool.
Diffstat (limited to 'lib/poolparty/pool/supervisor.ex')
-rw-r--r--lib/poolparty/pool/supervisor.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/poolparty/pool/supervisor.ex b/lib/poolparty/pool/supervisor.ex
index e95ceac..3132f46 100644
--- a/lib/poolparty/pool/supervisor.ex
+++ b/lib/poolparty/pool/supervisor.ex
@@ -1,13 +1,17 @@
defmodule PoolParty.Pool.Supervisor do
use Supervisor
+ require Logger
def start_link(pool_size, opts \\ []) do
+ Logger.debug("[#{__MODULE__}]: Starting Work Pool Supervisor")
Supervisor.start_link(__MODULE__, {pool_size}, opts)
end
def init({pool_size}) do
+ Logger.debug("[#{__MODULE__}]: Initializing Work Pool Supervisor")
children = (1..pool_size) |>
Enum.map(fn (id) ->
+ Logger.debug("[#{__MODULE__}]: Starting child worker: #{id}")
worker(PoolParty.Pool.Worker, [], id: id)
end)
supervise(children, strategy: :one_for_one)