Permalink
Browse files

Case where non-leaked variable caused troubles

  • Loading branch information...
1 parent d11bb78 commit edf7fb335893f001442b7488163cf2090d267077 Yurii Rashkovskii committed Jan 15, 2014
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/exlogger.ex
View
@@ -85,12 +85,13 @@ defmodule ExLogger do
module: object[:__MODULE__],
file: object[:__FILE__], line: object[:__LINE__],
pid: object[:__PID__]]
- case Process.get(ExLogger.Event) do
+ event = case Process.get(ExLogger.Event) do
nil ->
event = Process.whereis(ExLogger.Event)
Process.put(ExLogger.Event, event)
+ event
event ->
- :ok
+ event
end
:gen_event.notify(event, {:log, log_msg})
end

0 comments on commit edf7fb3

Please sign in to comment.