View Source RingLogger.Autoclient (ring_logger v0.11.3)

Helper module for RingLogger.Client to simplify IEx use

If you're a human, call these functions via RingLogger.*. If you're a program, call RingLogger.Client.start_link/1 to start your own client and call it directly.

Summary

Functions

Attach to the logger and print messages as they come in.

Fetch the current configuration for the attached client.

Print the log message count since the previous time this was called.

Detach from the logger. Log messages will stop being printed to the console.

Completely stop the RingLogger.Client. You normally don't need to run this.

Format a log message. This is useful if you're calling RingLogger.get/1 directly.

Run a regular expression on each entry in the log and print out the matchers.

Return a list of formatted log entries that match the given metadata key-value pair.

Print the log messages since the previous time this was called.

Reset the index used to keep track of the position in the log for tail/1 so that the next call to tail/1 starts back at the oldest entry.

Save the log.

Print the most recent log messages.

Functions

@spec attach(RingLogger.client_options()) :: :ok | {:error, term()}

Attach to the logger and print messages as they come in.

@spec config() :: RingLogger.client_options() | {:error, term()}

Fetch the current configuration for the attached client.

@spec count_next(RingLogger.client_options()) :: non_neg_integer()

Print the log message count since the previous time this was called.

@spec detach() :: :ok

Detach from the logger. Log messages will stop being printed to the console.

@spec forget() :: :ok

Completely stop the RingLogger.Client. You normally don't need to run this.

@spec format(RingLogger.entry()) :: :ok | {:error, term()}

Format a log message. This is useful if you're calling RingLogger.get/1 directly.

Link to this function

grep(regex_or_string, opts \\ [])

View Source
@spec grep(String.t() | Regex.t(), RingLogger.client_options()) ::
  :ok | {:error, term()}

Run a regular expression on each entry in the log and print out the matchers.

Link to this function

grep_metadata(key, match_value)

View Source
@spec grep_metadata(atom(), String.t() | Regex.t()) :: :ok | {:error, term()}

Return a list of formatted log entries that match the given metadata key-value pair.

@spec next(RingLogger.client_options()) :: :ok | {:error, term()}

Print the log messages since the previous time this was called.

@spec reset(RingLogger.client_options()) :: :ok | {:error, term()}

Reset the index used to keep track of the position in the log for tail/1 so that the next call to tail/1 starts back at the oldest entry.

@spec save(Path.t()) :: :ok | {:error, term()}

Save the log.

@spec tail(non_neg_integer(), RingLogger.client_options()) :: :ok

Print the most recent log messages.