Skip to content

Commit b992366

Browse files
committed
Tone down excessive logging
ExRabbitPool logs A LOT. Toning the logging down to debug helps with bringing down the volume.
1 parent 58f1124 commit b992366

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/clients/rabbitmq.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ defmodule ExRabbitPool.RabbitMQ do
6262
def declare_queue(channel, queue \\ "", options \\ []) do
6363
case Queue.declare(channel, queue, options) do
6464
{:ok, res} ->
65-
Logger.info("queue: #{queue} successfully declared")
65+
Logger.debug("queue: #{queue} successfully declared")
6666
{:ok, res}
6767

6868
{:error, reason} ->
@@ -80,7 +80,7 @@ defmodule ExRabbitPool.RabbitMQ do
8080

8181
case Exchange.declare(channel, exchange, type, options) do
8282
:ok ->
83-
Logger.info("exchange #{exchange} successfully declared")
83+
Logger.debug("exchange #{exchange} successfully declared")
8484
:ok
8585

8686
{:error, error} ->
@@ -96,7 +96,7 @@ defmodule ExRabbitPool.RabbitMQ do
9696
def queue_bind(channel, queue, exchange, options) do
9797
case Queue.bind(channel, queue, exchange, options) do
9898
:ok ->
99-
Logger.info("#{queue} successfully bound to #{exchange}")
99+
Logger.debug("#{queue} successfully bound to #{exchange}")
100100
:ok
101101

102102
{:error, error} ->

lib/worker/rabbit_connection.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ defmodule ExRabbitPool.Worker.RabbitConnection do
181181
{:noreply, state}
182182

183183
{:ok, connection} ->
184-
Logger.info("[Rabbit] connected")
184+
Logger.debug("[Rabbit] connected")
185185
%{pid: pid} = connection
186186
# link itself to the connection `pid` to handle connection
187187
# errors and spawn as many channels as needed based on config
@@ -304,7 +304,7 @@ defmodule ExRabbitPool.Worker.RabbitConnection do
304304
if Process.alive?(connection.pid) do
305305
case client.open_channel(connection) do
306306
{:ok, _channel} = result ->
307-
Logger.info("[Rabbit] channel connected")
307+
Logger.debug("[Rabbit] channel connected")
308308
result
309309

310310
{:error, reason} = error ->

0 commit comments

Comments
 (0)