static/jsvm/interfaces/slog.Level.html
A Level is the importance or severity of a log event. The higher the level, the more important or severe the event.
appendTextlevelmarshalJSONmarshalTextstringunmarshalJSONunmarshalText
AppendText implements [encoding.TextAppender] by calling [Level.String].
Level returns the receiver. It implements [Leveler].
MarshalJSON implements [encoding/json.Marshaler] by quoting the output of [Level.String].
MarshalText implements [encoding.TextMarshaler] by calling [Level.AppendText].
String returns a name for the level. If the level has a name, then that name in uppercase is returned. If the level is between named values, then an integer is appended to the uppercased name. Examples:
LevelWarn.String() => "WARN" (LevelInfo+2).String() => "INFO+2"Copy
UnmarshalJSON implements [encoding/json.Unmarshaler] It accepts any string produced by [Level.MarshalJSON], ignoring case. It also accepts numeric offsets that would result in a different string on output. For example, "Error-8" would marshal as "INFO".
UnmarshalText implements [encoding.TextUnmarshaler]. It accepts any string produced by [Level.MarshalText], ignoring case. It also accepts numeric offsets that would result in a different string on output. For example, "Error-8" would marshal as "INFO".
OSLightDark
Generated using TypeDoc