Log.Reset.LogPaths (Log Reset v0.1.70)

Copy Markdown View Source

A map of configured log paths and functions.

Summary

Types

t()

A map assigning configured log paths to their log levels

Functions

Creates a map assigning each configured log path to its log level.

Resets the configured log files of the given levels.

Types

t()

@type t() :: %{required(:logger.level()) => Path.t()}

A map assigning configured log paths to their log levels

Functions

new()

@spec new() :: t()

Creates a map assigning each configured log path to its log level.

reset_logs(log_paths, levels)

@spec reset_logs(t(), Log.Reset.levels()) :: :ok

Resets the configured log files of the given levels.

Examples

iex> alias Log.Reset.LogPaths
iex> LogPaths.reset_logs(%{}, :all) # No handlers configured?
:ok

iex> alias Log.Reset.LogPaths
iex> LogPaths.reset_logs(%{}, [:info, :error]) # No handlers either?
:ok