stable (1.2) latest (tip-of-tree) v8-inspector (node) Home Domains Accessibility Animation ApplicationCache Browser CSS CacheStorage Console DOM DOMDebugger DOMStorage Database Debugger DeviceOrientation Emulation HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Overlay Page Profiler Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome DevTools Protocol Viewer - latest (tip-of-tree)

Log Domain

Provides access to log entries.

Experimental

Methods

Log.enable

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

Log.disable

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

Log.clear

Clears the log.

Log.startViolationsReport

start violation reporting.

Parameters
config
array [ ViolationSetting ] Configuration for violations.

Log.stopViolationsReport

Stop violation reporting.

Events

Log. entryAdded

Issued when new message was logged.

Parameters
entry
LogEntry The entry.

Types

LogEntry

Log entry.

Type: object

Properties
source
string Log entry source. Allowed values: xml, javascript, network, storage, appcache, rendering, security, deprecation, worker, violation, intervention, other.
level
string Log entry severity. Allowed values: verbose, info, warning, error.
text
string Logged text.
timestamp
Runtime.Timestamp Timestamp when this entry was added.
url
string URL of the resource if known.
lineNumber
integer Line number in the resource.
stackTrace
Runtime.StackTrace JavaScript stack trace.
networkRequestId
Network.RequestId Identifier of the network request associated with this entry.
workerId
string Identifier of the worker associated with this entry.

ViolationSetting

Violation configuration setting.

Type: object

Properties
name
string Violation type. Allowed values: longTask, longLayout, blockedEvent, blockedParser, discouragedAPIUse, handler, recurringHandler.
threshold
number Time threshold to trigger upon.