File.Only.Logger (File-Only Logger v0.1.21) View Source
Link to this section Summary
Functions
Injects function error into the caller's module.
Returns string "module.function/arity" for the given environment.
Injects function info into the caller's module.
Link to this section Functions
Injects function error into the caller's module.
The function will write the message returned by the do_block
to the configured error log file.
Examples
use File.Only.Logger
error :exit, {reason} do
"""
\n'exit' caught...
• Reason:
#{inspect(reason)}
"""
end
Returns string "module.function/arity" for the given environment.
Examples
use File.Only.Logger
error :exit, {reason, env} do
"""
\n'exit' caught...
• Reason:
#{inspect(reason)}
• Inside function:
#{fun(env)}
"""
end
Injects function info into the caller's module.
The function will write the message returned by the do_block
to the configured info log file.
Examples
use File.Only.Logger
info :game_state, {player, game} do
"""
\nNote that #{player.name}...
• Has joined game #{inspect(game.name)}
• Game state: #{inspect(game.state)}
"""
end