Tungsten v0.1.0 Tungsten.CDP.Log View Source

Log

Provides access to log entries.

Link to this section Summary

Link to this section Types

Link to this type

cdp_log_entry_type() View Source
cdp_log_entry_type() :: %{
  :source =>
    :other
    | :recommendation
    | :intervention
    | :violation
    | :worker
    | :deprecation
    | :security
    | :rendering
    | :appcache
    | :storage
    | :network
    | :javascript
    | :xml,
  :level => :error | :warning | :info | :verbose,
  :text => String.t(),
  :timestamp => Tungsten.CDP.Runtime.cdp_timestamp_type(),
  optional(:url) => String.t(),
  optional(:line_number) => integer(),
  optional(:stack_trace) => Tungsten.CDP.Runtime.cdp_stack_trace_type(),
  optional(:network_request_id) => Tungsten.CDP.Network.cdp_request_id_type(),
  optional(:worker_id) => String.t(),
  optional(:args) => [Tungsten.CDP.Runtime.cdp_remote_object_type()]
}

Log.LogEntry

Log entry.

Link to this type

cdp_violation_setting_type() View Source
cdp_violation_setting_type() :: %{
  name:
    :recurring_handler
    | :handler
    | :discouraged_api_use
    | :blocked_parser
    | :blocked_event
    | :long_layout
    | :long_task,
  threshold: integer() | float()
}

Log.ViolationSetting

Violation configuration setting.

Link to this section Functions

Link to this function

clear(session, parameters \\ %{}, options \\ []) View Source
clear(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

Log.clear

Clears the log.

Link to this function

disable(session, parameters \\ %{}, options \\ []) View Source
disable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

Log.disable

Disables log domain, prevents further log entries from being reported to the client.

Link to this function

enable(session, parameters \\ %{}, options \\ []) View Source
enable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

Log.enable

Enables log domain, sends the entries collected so far to the client by means of the entryAdded notification.

Link to this function

start_violations_report(session, parameters, options \\ []) View Source
start_violations_report(
  GenServer.server(),
  %{config: [cdp_violation_setting_type()]},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Log.startViolationsReport

start violation reporting.

Link to this function

stop_violations_report(session, parameters \\ %{}, options \\ []) View Source
stop_violations_report(
  GenServer.server(),
  map(),
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Log.stopViolationsReport

Stop violation reporting.