glendam/protocol/log
This module is generated from the Chrome DevTools Protocol schema.
Do not edit this file manually. Generator: dev/codegen/generate_bindings.gleam Regenerate with:
gleam run -m codegen/generate_bindings
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)), )Represents the LogEntry protocol value.
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
-
LogEntryCategoryCorsRepresents the
corsprotocol value.
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
-
LogEntryLevelVerboseRepresents the
verboseprotocol value. -
LogEntryLevelInfoRepresents the
infoprotocol value. -
LogEntryLevelWarningRepresents the
warningprotocol value. -
LogEntryLevelErrorRepresents the
errorprotocol value.
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
-
LogEntrySourceXmlRepresents the
xmlprotocol value. -
LogEntrySourceJavascriptRepresents the
javascriptprotocol value. -
LogEntrySourceNetworkRepresents the
networkprotocol value. -
LogEntrySourceStorageRepresents the
storageprotocol value. -
LogEntrySourceAppcacheRepresents the
appcacheprotocol value. -
LogEntrySourceRenderingRepresents the
renderingprotocol value. -
LogEntrySourceSecurityRepresents the
securityprotocol value. -
LogEntrySourceDeprecationRepresents the
deprecationprotocol value. -
LogEntrySourceWorkerRepresents the
workerprotocol value. -
LogEntrySourceViolationRepresents the
violationprotocol value. -
LogEntrySourceInterventionRepresents the
interventionprotocol value. -
LogEntrySourceRecommendationRepresents the
recommendationprotocol value. -
LogEntrySourceOtherRepresents the
otherprotocol value.
Violation configuration setting.
pub type ViolationSetting {
ViolationSetting(name: ViolationSettingName, threshold: Float)
}
Constructors
-
ViolationSetting(name: ViolationSettingName, threshold: Float)Represents the ViolationSetting protocol value.
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
-
ViolationSettingNameLongTaskRepresents the
longTaskprotocol value. -
ViolationSettingNameLongLayoutRepresents the
longLayoutprotocol value. -
ViolationSettingNameBlockedEventRepresents the
blockedEventprotocol value. -
ViolationSettingNameBlockedParserRepresents the
blockedParserprotocol value. -
ViolationSettingNameDiscouragedApiUseRepresents the
discouragedAPIUseprotocol value. -
ViolationSettingNameHandlerRepresents the
handlerprotocol value. -
ViolationSettingNameRecurringHandlerRepresents the
recurringHandlerprotocol value.
Values
pub fn clear(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
) -> Result(dynamic.Dynamic, chrome.RequestError)
Clears the log.
pub fn disable(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
) -> Result(dynamic.Dynamic, chrome.RequestError)
Disables log domain, prevents further log entries from being reported to the client.
pub fn enable(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
) -> Result(dynamic.Dynamic, chrome.RequestError)
Enables log domain, sends the entries collected so far to the client by means of the
entryAdded notification.
pub fn start_violations_report(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
config config: List(ViolationSetting),
) -> Result(dynamic.Dynamic, chrome.RequestError)
start violation reporting.
Parameters:
config: Configuration for violations.
Returns:
pub fn stop_violations_report(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
) -> Result(dynamic.Dynamic, chrome.RequestError)
Stop violation reporting.