chrobot/protocol/log
⚙️ This module was generated from the Chrome DevTools Protocol version 1.3
Log Domain
Provides access to log entries.
📖 View this domain on the DevTools Protocol API Docs
Types
Log entry.
pub type LogEntry {
LogEntry(
source: LogEntrySource,
level: LogEntryLevel,
text: String,
category: option.Option(LogEntryCategory),
timestamp: runtime.Timestamp,
url: option.Option(String),
line_number: option.Option(Int),
stack_trace: option.Option(runtime.StackTrace),
network_request_id: option.Option(network.RequestId),
worker_id: option.Option(String),
args: option.Option(List(runtime.RemoteObject)),
)
}
Constructors
-
LogEntry( source: LogEntrySource, level: LogEntryLevel, text: String, category: option.Option(LogEntryCategory), timestamp: runtime.Timestamp, url: option.Option(String), line_number: option.Option(Int), stack_trace: option.Option(runtime.StackTrace), network_request_id: option.Option(network.RequestId), worker_id: option.Option(String), args: option.Option(List(runtime.RemoteObject)), )Arguments
- source
-
Log entry source.
- level
-
Log entry severity.
- text
-
Logged text.
- timestamp
-
Timestamp when this entry was added.
- url
-
URL of the resource if known.
- line_number
-
Line number in the resource.
- stack_trace
-
JavaScript stack trace.
- network_request_id
-
Identifier of the network request associated with this entry.
- worker_id
-
Identifier of the worker associated with this entry.
- args
-
Call arguments.
This type is not part of the protocol spec, it has been generated dynamically
to represent the possible values of the enum property category of LogEntry
pub type LogEntryCategory {
LogEntryCategoryCors
}
Constructors
-
LogEntryCategoryCors
This type is not part of the protocol spec, it has been generated dynamically
to represent the possible values of the enum property level of LogEntry
pub type LogEntryLevel {
LogEntryLevelVerbose
LogEntryLevelInfo
LogEntryLevelWarning
LogEntryLevelError
}
Constructors
-
LogEntryLevelVerbose -
LogEntryLevelInfo -
LogEntryLevelWarning -
LogEntryLevelError
This type is not part of the protocol spec, it has been generated dynamically
to represent the possible values of the enum property source of LogEntry
pub type LogEntrySource {
LogEntrySourceXml
LogEntrySourceJavascript
LogEntrySourceNetwork
LogEntrySourceStorage
LogEntrySourceAppcache
LogEntrySourceRendering
LogEntrySourceSecurity
LogEntrySourceDeprecation
LogEntrySourceWorker
LogEntrySourceViolation
LogEntrySourceIntervention
LogEntrySourceRecommendation
LogEntrySourceOther
}
Constructors
-
LogEntrySourceXml -
LogEntrySourceJavascript -
LogEntrySourceNetwork -
LogEntrySourceStorage -
LogEntrySourceAppcache -
LogEntrySourceRendering -
LogEntrySourceSecurity -
LogEntrySourceDeprecation -
LogEntrySourceWorker -
LogEntrySourceViolation -
LogEntrySourceIntervention -
LogEntrySourceRecommendation -
LogEntrySourceOther
Violation configuration setting.
pub type ViolationSetting {
ViolationSetting(name: ViolationSettingName, threshold: Float)
}
Constructors
-
ViolationSetting(name: ViolationSettingName, threshold: Float)Arguments
- name
-
Violation type.
- threshold
-
Time threshold to trigger upon.
This type is not part of the protocol spec, it has been generated dynamically
to represent the possible values of the enum property name of ViolationSetting
pub type ViolationSettingName {
ViolationSettingNameLongTask
ViolationSettingNameLongLayout
ViolationSettingNameBlockedEvent
ViolationSettingNameBlockedParser
ViolationSettingNameDiscouragedApiUse
ViolationSettingNameHandler
ViolationSettingNameRecurringHandler
}
Constructors
-
ViolationSettingNameLongTask -
ViolationSettingNameLongLayout -
ViolationSettingNameBlockedEvent -
ViolationSettingNameBlockedParser -
ViolationSettingNameDiscouragedApiUse -
ViolationSettingNameHandler -
ViolationSettingNameRecurringHandler
Values
pub fn disable(
callback__: fn(String, option.Option(a)) -> b,
) -> b
Disables log domain, prevents further log entries from being reported to the client.
pub fn enable(callback__: fn(String, option.Option(a)) -> b) -> b
Enables log domain, sends the entries collected so far to the client by means of the
entryAdded notification.
pub fn start_violations_report(
callback__: fn(String, option.Option(json.Json)) -> a,
config config: List(ViolationSetting),
) -> a
start violation reporting.
Parameters:
config: Configuration for violations.
Returns:
pub fn stop_violations_report(
callback__: fn(String, option.Option(a)) -> b,
) -> b
Stop violation reporting.