log

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package log implements the Log domain. Provides access to log entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the Log domain with the connection set to conn.

Types

type Entry

type Entry struct {
	// Source Log entry source.
	//
	// Values: "xml", "javascript", "network", "storage", "appcache", "rendering", "security", "deprecation", "worker", "violation", "intervention", "recommendation", "other".
	Source string `json:"source"`
	// Level Log entry severity.
	//
	// Values: "verbose", "info", "warning", "error".
	Level            string                 `json:"level"`
	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       *int                   `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.

type EntryAddedClient

type EntryAddedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*EntryAddedReply, error)
	rpcc.Stream
}

EntryAddedClient is a client for EntryAdded events. Issued when new message was logged.

type EntryAddedReply

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

EntryAddedReply is the reply for EntryAdded events.

type StartViolationsReportArgs

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

StartViolationsReportArgs represents the arguments for StartViolationsReport in the Log domain.

func NewStartViolationsReportArgs

func NewStartViolationsReportArgs(config []ViolationSetting) *StartViolationsReportArgs

NewStartViolationsReportArgs initializes StartViolationsReportArgs with the required arguments.

type ViolationSetting

type ViolationSetting struct {
	// Name Violation type.
	//
	// Values: "longTask", "longLayout", "blockedEvent", "blockedParser", "discouragedAPIUse", "handler", "recurringHandler".
	Name      string  `json:"name"`
	Threshold float64 `json:"threshold"` // Time threshold to trigger upon.
}

ViolationSetting Violation configuration setting.

Jump to

Keyboard shortcuts

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