glendam/protocol/log

This module is generated from the Chrome DevTools Protocol schema.

Do not edit this file manually. Generator: dev/codegen/generate_bindings.gleam Regenerate with:

gleam run -m codegen/generate_bindings

Protocol version: 1.3

Log Domain

Provides access to log entries.

📖 View this domain on the DevTools Protocol API Docs

Types

Log entry.

pub type LogEntry {
  LogEntry(
    source: LogEntrySource,
    level: LogEntryLevel,
    text: String,
    category: option.Option(LogEntryCategory),
    timestamp: runtime.Timestamp,
    url: option.Option(String),
    line_number: option.Option(Int),
    stack_trace: option.Option(runtime.StackTrace),
    network_request_id: option.Option(network.RequestId),
    worker_id: option.Option(String),
    args: option.Option(List(runtime.RemoteObject)),
  )
}

Constructors

This type is not part of the protocol spec, it has been generated dynamically to represent the possible values of the enum property category of LogEntry

pub type LogEntryCategory {
  LogEntryCategoryCors
}

Constructors

  • LogEntryCategoryCors

    Represents the cors protocol value.

This type is not part of the protocol spec, it has been generated dynamically to represent the possible values of the enum property level of LogEntry

pub type LogEntryLevel {
  LogEntryLevelVerbose
  LogEntryLevelInfo
  LogEntryLevelWarning
  LogEntryLevelError
}

Constructors

  • LogEntryLevelVerbose

    Represents the verbose protocol value.

  • LogEntryLevelInfo

    Represents the info protocol value.

  • LogEntryLevelWarning

    Represents the warning protocol value.

  • LogEntryLevelError

    Represents the error protocol value.

This type is not part of the protocol spec, it has been generated dynamically to represent the possible values of the enum property source of LogEntry

pub type LogEntrySource {
  LogEntrySourceXml
  LogEntrySourceJavascript
  LogEntrySourceNetwork
  LogEntrySourceStorage
  LogEntrySourceAppcache
  LogEntrySourceRendering
  LogEntrySourceSecurity
  LogEntrySourceDeprecation
  LogEntrySourceWorker
  LogEntrySourceViolation
  LogEntrySourceIntervention
  LogEntrySourceRecommendation
  LogEntrySourceOther
}

Constructors

  • LogEntrySourceXml

    Represents the xml protocol value.

  • LogEntrySourceJavascript

    Represents the javascript protocol value.

  • LogEntrySourceNetwork

    Represents the network protocol value.

  • LogEntrySourceStorage

    Represents the storage protocol value.

  • LogEntrySourceAppcache

    Represents the appcache protocol value.

  • LogEntrySourceRendering

    Represents the rendering protocol value.

  • LogEntrySourceSecurity

    Represents the security protocol value.

  • LogEntrySourceDeprecation

    Represents the deprecation protocol value.

  • LogEntrySourceWorker

    Represents the worker protocol value.

  • LogEntrySourceViolation

    Represents the violation protocol value.

  • LogEntrySourceIntervention

    Represents the intervention protocol value.

  • LogEntrySourceRecommendation

    Represents the recommendation protocol value.

  • LogEntrySourceOther

    Represents the other protocol value.

Violation configuration setting.

pub type ViolationSetting {
  ViolationSetting(name: ViolationSettingName, threshold: Float)
}

Constructors

  • ViolationSetting(name: ViolationSettingName, threshold: Float)

    Represents the ViolationSetting protocol value.

    Arguments

    name

    Violation type.

    threshold

    Time threshold to trigger upon.

This type is not part of the protocol spec, it has been generated dynamically to represent the possible values of the enum property name of ViolationSetting

pub type ViolationSettingName {
  ViolationSettingNameLongTask
  ViolationSettingNameLongLayout
  ViolationSettingNameBlockedEvent
  ViolationSettingNameBlockedParser
  ViolationSettingNameDiscouragedApiUse
  ViolationSettingNameHandler
  ViolationSettingNameRecurringHandler
}

Constructors

  • ViolationSettingNameLongTask

    Represents the longTask protocol value.

  • ViolationSettingNameLongLayout

    Represents the longLayout protocol value.

  • ViolationSettingNameBlockedEvent

    Represents the blockedEvent protocol value.

  • ViolationSettingNameBlockedParser

    Represents the blockedParser protocol value.

  • ViolationSettingNameDiscouragedApiUse

    Represents the discouragedAPIUse protocol value.

  • ViolationSettingNameHandler

    Represents the handler protocol value.

  • ViolationSettingNameRecurringHandler

    Represents the recurringHandler protocol value.

Values

pub fn clear(
  callback callback__: fn(String, option.Option(json.Json)) -> Result(
    dynamic.Dynamic,
    chrome.RequestError,
  ),
) -> Result(dynamic.Dynamic, chrome.RequestError)

Clears the log.

pub fn disable(
  callback callback__: fn(String, option.Option(json.Json)) -> Result(
    dynamic.Dynamic,
    chrome.RequestError,
  ),
) -> Result(dynamic.Dynamic, chrome.RequestError)

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

pub fn enable(
  callback callback__: fn(String, option.Option(json.Json)) -> Result(
    dynamic.Dynamic,
    chrome.RequestError,
  ),
) -> Result(dynamic.Dynamic, chrome.RequestError)

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

pub fn start_violations_report(
  callback callback__: fn(String, option.Option(json.Json)) -> Result(
    dynamic.Dynamic,
    chrome.RequestError,
  ),
  config config: List(ViolationSetting),
) -> Result(dynamic.Dynamic, chrome.RequestError)

start violation reporting.

Parameters:

  • config : Configuration for violations.

Returns:

pub fn stop_violations_report(
  callback callback__: fn(String, option.Option(json.Json)) -> Result(
    dynamic.Dynamic,
    chrome.RequestError,
  ),
) -> Result(dynamic.Dynamic, chrome.RequestError)

Stop violation reporting.

Search Document