import "github.com/chromedp/cdproto/log"
Package log provides the Chrome DevTools Protocol commands, types, and events for the Log domain.
Provides access to log entries.
Generated by the cdproto-gen command.
easyjson.go events.go log.go types.go
const ( CommandClear = "Log.clear" CommandDisable = "Log.disable" CommandEnable = "Log.enable" CommandStartViolationsReport = "Log.startViolationsReport" CommandStopViolationsReport = "Log.stopViolationsReport" )
Command names.
type ClearParams struct{}
ClearParams clears the log.
func Clear() *ClearParams
Clear clears the log.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-clear
func (p *ClearParams) Do(ctx context.Context) (err error)
Do executes Log.clear against the provided context.
func (v ClearParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ClearParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ClearParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ClearParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DisableParams struct{}
DisableParams disables log domain, prevents further log entries from being reported to the client.
func Disable() *DisableParams
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
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes Log.disable against the provided context.
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams struct{}
EnableParams enables log domain, sends the entries collected so far to the client by means of the entryAdded notification.
func Enable() *EnableParams
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
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Log.enable against the provided context.
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Entry struct { Source Source `json:"source"` // Log entry source. Level Level `json:"level"` // Log entry severity. Text string `json:"text"` // Logged text. Timestamp *runtime.Timestamp `json:"timestamp"` // Timestamp when this entry was added. URL string `json:"url,omitempty"` // URL of the resource if known. LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the resource. StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace. NetworkRequestID network.RequestID `json:"networkRequestId,omitempty"` // Identifier of the network request associated with this entry. WorkerID string `json:"workerId,omitempty"` // Identifier of the worker associated with this entry. Args []*runtime.RemoteObject `json:"args,omitempty"` // Call arguments. }
Entry log entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
EventEntryAdded issued when new message was logged.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#event-entryAdded
func (v EventEntryAdded) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventEntryAdded) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventEntryAdded) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventEntryAdded) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Level log entry severity.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry
const ( LevelVerbose Level = "verbose" LevelInfo Level = "info" LevelWarning Level = "warning" LevelError Level = "error" )
Level values.
MarshalEasyJSON satisfies easyjson.Marshaler.
MarshalJSON satisfies json.Marshaler.
String returns the Level as string value.
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
UnmarshalJSON satisfies json.Unmarshaler.
Source log entry source.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry
const ( SourceXML Source = "xml" SourceJavascript Source = "javascript" SourceNetwork Source = "network" SourceStorage Source = "storage" SourceAppcache Source = "appcache" SourceRendering Source = "rendering" SourceSecurity Source = "security" SourceDeprecation Source = "deprecation" SourceWorker Source = "worker" SourceViolation Source = "violation" SourceIntervention Source = "intervention" SourceRecommendation Source = "recommendation" SourceOther Source = "other" )
Source values.
MarshalEasyJSON satisfies easyjson.Marshaler.
MarshalJSON satisfies json.Marshaler.
String returns the Source as string value.
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
UnmarshalJSON satisfies json.Unmarshaler.
type StartViolationsReportParams struct { Config []*ViolationSetting `json:"config"` // Configuration for violations. }
StartViolationsReportParams start violation reporting.
func StartViolationsReport(config []*ViolationSetting) *StartViolationsReportParams
StartViolationsReport start violation reporting.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-startViolationsReport
parameters:
config - Configuration for violations.
func (p *StartViolationsReportParams) Do(ctx context.Context) (err error)
Do executes Log.startViolationsReport against the provided context.
func (v StartViolationsReportParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v StartViolationsReportParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *StartViolationsReportParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *StartViolationsReportParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type StopViolationsReportParams struct{}
StopViolationsReportParams stop violation reporting.
func StopViolationsReport() *StopViolationsReportParams
StopViolationsReport stop violation reporting.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-stopViolationsReport
func (p *StopViolationsReportParams) Do(ctx context.Context) (err error)
Do executes Log.stopViolationsReport against the provided context.
func (v StopViolationsReportParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v StopViolationsReportParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *StopViolationsReportParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *StopViolationsReportParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Violation violation type.
See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-ViolationSetting
const ( ViolationLongTask Violation = "longTask" ViolationLongLayout Violation = "longLayout" ViolationBlockedEvent Violation = "blockedEvent" ViolationBlockedParser Violation = "blockedParser" ViolationDiscouragedAPIUse Violation = "discouragedAPIUse" ViolationHandler Violation = "handler" ViolationRecurringHandler Violation = "recurringHandler" )
Violation values.
MarshalEasyJSON satisfies easyjson.Marshaler.
MarshalJSON satisfies json.Marshaler.
String returns the Violation as string value.
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
UnmarshalJSON satisfies json.Unmarshaler.
type ViolationSetting struct { Name Violation `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
func (v ViolationSetting) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ViolationSetting) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ViolationSetting) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ViolationSetting) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Package log imports 9 packages (graph) and is imported by 18 packages. Updated 2021-01-10. Refresh now. Tools for package owners.