logs

package
v0.0.0-...-7f16e2a Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalReadableJSON

func MarshalReadableJSON(x interface{}) ([]byte, error)

func SaveJSON

func SaveJSON(name string, x interface{}) error

func SaveJSONLogs

func SaveJSONLogs(name string, log *public_log.Log, debug *private_log.DebugLog) error

func SaveReadableJSON

func SaveReadableJSON(name string, x interface{}) error

func StartTestServer

func StartTestServer(ctx context.Context) *bootstrap.TestServer

Types

type Config

type Config struct {
	Output           string `yaml:"output"`
	ValidateIDRegexp string `yaml:"validate-id-regexp"`
	SaveDebug        bool   `yaml:"save-debug"`
	SaveJSON         bool   `yaml:"save-json"`
}

type FileServer

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

FileServer saves logs on disk

func NewFileServer

func NewFileServer(l *zap.Logger, cfg *Config) (*FileServer, error)

func (*FileServer) GetLog

func (*FileServer) SaveLog

type MemoryServer

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

MemoryServer just saves logs in memory

func NewMemoryServer

func NewMemoryServer(cfg *Config) *MemoryServer

func (*MemoryServer) GetDebugLog

func (*MemoryServer) GetLog

func (*MemoryServer) SaveLog

Jump to

Keyboard shortcuts

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