smart_tracer v0.2.1 SmartTracer.Custom behaviour View Source
With SmartTracer, you can also specify how you would want to present the traces.
Here's an example.
defmodule SmartTracer.Examples.CustomTracer do
use SmartTracer.Custom
def handle(:call, {module, fun, args}) do
IO.puts("#{module}.#{fun}/#{length(args)} was called with #{inspect(args)}")
end
def handle(:return, {module, fun, arity, return_value}) do
IO.puts("#{module}.#{fun}/#{arity} returned: #{inspect(return_value)}")
end
end