log

package
v0.158.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 3 Imported by: 61

Documentation

Overview

Package log provides the Chrome DevTools Protocol commands, types, and events for the Log domain.

Provides access to log entries.

Generated by the pdlgen command.

Index

Constants

View Source
const (
	CommandClear                 = "Log.clear"
	CommandDisable               = "Log.disable"
	CommandEnable                = "Log.enable"
	CommandStartViolationsReport = "Log.startViolationsReport"
	CommandStopViolationsReport  = "Log.stopViolationsReport"
)

Command names.

Variables

Clear clears the log.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-clear

View Source
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}

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

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-disable

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

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-enable

View Source
var EntryAdded = cdp.Event[EventEntryAdded]{Method: "Log.entryAdded"}

EntryAdded issued when new message was logged.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#event-entryAdded

StartViolationsReport start violation reporting.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-startViolationsReport

View Source
var StopViolationsReport = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandStopViolationsReport}

StopViolationsReport stop violation reporting.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-stopViolationsReport

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Source           EntrySource             `json:"source"` // Log entry source.
	Level            EntryLevel              `json:"level"`  // Log entry severity.
	Text             string                  `json:"text"`   // Logged text.
	Category         EntryCategory           `json:"category,omitempty,omitzero"`
	Timestamp        runtime.Timestamp       `json:"timestamp"`                           // Timestamp when this entry was added.
	URL              string                  `json:"url,omitempty,omitzero"`              // URL of the resource if known.
	LineNumber       int64                   `json:"lineNumber,omitempty,omitzero"`       // Line number in the resource.
	StackTrace       *runtime.StackTrace     `json:"stackTrace,omitempty,omitzero"`       // JavaScript stack trace.
	NetworkRequestID network.RequestID       `json:"networkRequestId,omitempty,omitzero"` // Identifier of the network request associated with this entry.
	WorkerID         string                  `json:"workerId,omitempty,omitzero"`         // Identifier of the worker associated with this entry.
	Args             []*runtime.RemoteObject `json:"args,omitempty,omitzero"`             // Call arguments.
}

Entry log entry.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry

type EntryCategory added in v0.157.1

type EntryCategory string

EntryCategory [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry

const (
	EntryCategoryCors EntryCategory = "cors"
)

EntryCategory values.

func (EntryCategory) String added in v0.157.1

func (t EntryCategory) String() string

String returns the EntryCategory as string value.

type EntryLevel added in v0.157.1

type EntryLevel string

EntryLevel log entry severity.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry

const (
	EntryLevelVerbose EntryLevel = "verbose"
	EntryLevelInfo    EntryLevel = "info"
	EntryLevelWarning EntryLevel = "warning"
	EntryLevelError   EntryLevel = "error"
)

EntryLevel values.

func (EntryLevel) String added in v0.157.1

func (t EntryLevel) String() string

String returns the EntryLevel as string value.

type EntrySource added in v0.157.1

type EntrySource string

EntrySource log entry source.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry

const (
	EntrySourceXML            EntrySource = "xml"
	EntrySourceJavascript     EntrySource = "javascript"
	EntrySourceNetwork        EntrySource = "network"
	EntrySourceStorage        EntrySource = "storage"
	EntrySourceAppcache       EntrySource = "appcache"
	EntrySourceRendering      EntrySource = "rendering"
	EntrySourceSecurity       EntrySource = "security"
	EntrySourceDeprecation    EntrySource = "deprecation"
	EntrySourceWorker         EntrySource = "worker"
	EntrySourceViolation      EntrySource = "violation"
	EntrySourceIntervention   EntrySource = "intervention"
	EntrySourceRecommendation EntrySource = "recommendation"
	EntrySourceOther          EntrySource = "other"
)

EntrySource values.

func (EntrySource) String added in v0.157.1

func (t EntrySource) String() string

String returns the EntrySource as string value.

type EventEntryAdded

type EventEntryAdded struct {
	Entry *Entry `json:"entry"` // The entry.
}

EventEntryAdded issued when new message was logged.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#event-entryAdded

type StartViolationsReportParams

type StartViolationsReportParams struct {
	Config []*ViolationSetting `json:"config"` // Configuration for violations.
}

StartViolationsReportParams are the parameters of the command Log.startViolationsReport.

type ViolationSetting

type ViolationSetting struct {
	Name      ViolationSettingName `json:"name"`      // Violation type.
	Threshold float64              `json:"threshold"` // Time threshold to trigger upon.
}

ViolationSetting violation configuration setting.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-ViolationSetting

type ViolationSettingName added in v0.157.1

type ViolationSettingName string

ViolationSettingName violation type.

See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-ViolationSetting

const (
	ViolationSettingNameLongTask          ViolationSettingName = "longTask"
	ViolationSettingNameLongLayout        ViolationSettingName = "longLayout"
	ViolationSettingNameBlockedEvent      ViolationSettingName = "blockedEvent"
	ViolationSettingNameBlockedParser     ViolationSettingName = "blockedParser"
	ViolationSettingNameDiscouragedAPIUse ViolationSettingName = "discouragedAPIUse"
	ViolationSettingNameHandler           ViolationSettingName = "handler"
	ViolationSettingNameRecurringHandler  ViolationSettingName = "recurringHandler"
)

ViolationSettingName values.

func (ViolationSettingName) String added in v0.157.1

func (t ViolationSettingName) String() string

String returns the ViolationSettingName as string value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL