writable

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 1 Imported by: 0

README

recordable

Stdout

New
func New(ctx context.Context, level loglevel.LogLevel, converter func(log.Log) string) log.Writable

New is constructor of Stdout instance.
ctx is recomended to use context.WithCancel to cancel Stdout instance.
level is criterion of this log.Writable instance.
converter is converting log.Log to string when writing.
if converter is nil, will write time formated RFC3339Nano and log's message.

Write
func (s *Stdout) Write(value log.Log) error

write value to stdout with converter.

Nats

DO NOT USE THIS

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Readable

type Readable interface {
	Read(start, end int64) ([]string, error)
	Close() error
}

type Writable

type Writable interface {
	Write(log log.Log) error
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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