Log.Reset (Log Reset v0.1.44) View Source

Resets configured log files.

Link to this section Summary

Types

Log levels

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

Specs

levels() :: [Logger.level()] | :all | :none

Log levels

Link to this section Functions

Specs

log_paths() :: Log.Reset.LogPaths.t()

Returns a map of configured log paths.

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"
}

Specs

refresh_log_paths() :: Log.Reset.LogPaths.t()

Refreshes the map of configured log paths from the application environment.

Specs

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