View Source Log.Reset (Log Reset v0.1.52)
Resets configured log files.
Link to this section 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
.
Link to this section Types
@type levels() :: [Logger.level()] | :all | :none
Log levels
Link to this section Functions
@spec log_paths() :: Log.Reset.LogPaths.t()
Returns a map of configured log paths.
examples
Examples
iex> alias Log.Reset
iex> Reset.log_paths()
%{
debug: "./log/debug.log",
error: "./log/error.log",
info: "./log/info.log",
warn: "./log/warn.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
Examples
iex> alias Log.Reset
iex> # No logs reset as log paths not configured...
iex> Reset.reset_logs([:alert, :notice])
:ok