Log

class Log(cdp: CDP) : Domain

Provides access to log entries.

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class EntryAddedParameter(val entry: Log.LogEntry)

Issued when new message was logged.

Link copied to clipboard
@Serializable
data class LogEntry(val source: String, val level: String, val text: String, val category: String? = null, val timestamp: Double, val url: String? = null, val lineNumber: Int? = null, val stackTrace: Runtime.StackTrace? = null, val networkRequestId: String? = null, val workerId: String? = null, val args: List<Runtime.RemoteObject>? = null)

Log entry.

Link copied to clipboard
@Serializable
data class StartViolationsReportParameter(val config: List<Log.ViolationSetting>)
Link copied to clipboard
@Serializable
data class ViolationSetting(val name: String, val threshold: Double)

Violation configuration setting.

Properties

Link copied to clipboard

Issued when new message was logged.

Functions

Link copied to clipboard
suspend fun clear(mode: CommandMode = CommandMode.DEFAULT)

Clears the log.

Link copied to clipboard
suspend fun disable(mode: CommandMode = CommandMode.DEFAULT)

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

Link copied to clipboard
suspend fun enable(mode: CommandMode = CommandMode.DEFAULT)

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

Link copied to clipboard
suspend fun startViolationsReport(args: Log.StartViolationsReportParameter, mode: CommandMode = CommandMode.DEFAULT)

start violation reporting.

Link copied to clipboard
suspend fun stopViolationsReport(mode: CommandMode = CommandMode.DEFAULT)

Stop violation reporting.