View Source Grizzly.Trace (grizzly v4.0.0)

Module that tracks the commands that are sent and received by Grizzly

The trace will hold in memory the last 300 messages. If you want to generate a log file of the trace records you use Grizzly.Trace.dump/1.

The log format is:

timestamp source destination sequence_number command_name command_parameters

If you want to list the records that are currently being held in memory you can use Grizzly.Trace.list/0.

If you want to start traces from a fresh start you can call Grizzly.Trace.clear/0.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Force clear the records from the trace

Dump the trace records into a file

List all the records currently being traced

Log the trace information

Start the trace server

Link to this section Types

@type dest() :: String.t()
@type log_opt() :: {:src, src()} | {:dest, dest()}
@type src() :: String.t()

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec clear() :: :ok

Force clear the records from the trace

@spec dump(Path.t()) :: :ok

Dump the trace records into a file

@spec list() :: [Grizzly.Trace.Record.t()]

List all the records currently being traced

@spec log(binary(), [log_opt()]) :: :ok

Log the trace information

@spec start_link(keyword()) :: GenServer.on_start()

Start the trace server