log

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2017 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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", "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.
}

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