forked from tebeka/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.go
52 lines (44 loc) · 1.39 KB
/
log.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Package log provides logging-related configuration types and constants.
package log
import "time"
// Type represents a component capable of logging.
type Type string
// The valid log types.
const (
Server Type = "server"
Browser Type = "browser"
Client Type = "client"
Driver Type = "driver"
Performance Type = "performance"
Profiler Type = "profiler"
)
// Level represents a logging level of different components in the browser,
// the driver, or any intermediary WebDriver servers.
//
// See the documentation of each driver for what browser specific logging
// components are available.
type Level string
// The valid log levels.
const (
Off Level = "OFF"
Severe Level = "SEVERE"
Warning Level = "WARNING"
Info Level = "INFO"
Debug Level = "DEBUG"
All Level = "ALL"
)
// CapabilitiesKey is the key for the logging preferences entry in the JSON
// structure representing WebDriver capabilities.
//
// Note that the W3C spec does not include logging right now, and starting with
// Chrome 75, "loggingPrefs" has been changed to "goog:loggingPrefs"
const CapabilitiesKey = "goog:loggingPrefs"
// Capabilities is the map to include in the WebDriver capabilities structure
// to configure logging.
type Capabilities map[Type]Level
// Message is a log message returned from the Log method.
type Message struct {
Timestamp time.Time
Level Level
Message string
}