View Source Log.Reset (Log Reset v0.1.60)
Resets configured log files.
Summary
Functions
Returns a map of configured log paths.
Refreshes the map of configured log paths from the application environment.
Resets the configured log files of the given levels
.
Types
@type levels() :: [Logger.level()] | :all | :none
Log levels
Functions
@spec log_paths() :: Log.Reset.LogPaths.t()
Returns a map of configured log paths.
Examples
iex> alias Log.Reset
iex> Reset.log_paths()
# Listed alphabetically...
%{
debug: ~c"c:/Users/Ray/Documents/ex_dev/projects/log_reset/log/debug.log",
error: ~c"c:/Users/Ray/Documents/ex_dev/projects/log_reset/log/error.log",
info: ~c"c:/Users/Ray/Documents/ex_dev/projects/log_reset/log/info.log",
warning: ~c"c:/Users/Ray/Documents/ex_dev/projects/log_reset/log/warning.log"
}
@spec refresh_log_paths() :: Log.Reset.LogPaths.t()
Refreshes the map of configured log paths from the application environment.
@spec reset_logs(levels()) :: :ok
Resets the configured log files of the given levels
.
Examples
iex> alias Log.Reset
iex> # No logs reset as log paths not configured...
iex> Reset.reset_logs([:alert, :notice])
:ok