console

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package console はWebGoスクリプト向けのログAPIを提供する。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

type Console struct {
	// contains filtered or unexported fields
}

Console は1ページのWebGoログを出力する。

func New

func New(sink func(message string)) *Console

New は指定した出力先を使うConsoleを生成する。

func NewWithLevelSink added in v0.12.0

func NewWithLevelSink(sink func(level Level, message string)) *Console

NewWithLevelSink creates a Console that preserves message severity.

func (*Console) Error added in v0.12.0

func (console *Console) Error(values ...any)

Error emits an error WebGo message.

func (*Console) Info added in v0.12.0

func (console *Console) Info(values ...any)

Info emits an informational WebGo message.

func (*Console) Log

func (console *Console) Log(values ...any)

Log は値を連結し、WebGoログとして出力する。

func (*Console) Warn added in v0.12.0

func (console *Console) Warn(values ...any)

Warn emits a warning WebGo message.

type Level added in v0.12.0

type Level string

Level identifies the severity selected by a WebGo console call.

const (
	LevelLog   Level = "log"
	LevelInfo  Level = "info"
	LevelWarn  Level = "warn"
	LevelError Level = "error"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL