logger

package
v0.6.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const ConsoleType = "console"

ConsoleType defines console logger type name

View Source
const FileType = "file"

FileType defines file logger type name

View Source
const RedisType = "redis"

RedisType defines redis logger type name

Variables

This section is empty.

Functions

func Serialize added in v0.3.4

func Serialize(path string, logs []Logs) error

Serialize dumps logs array into a json file

Types

type Logs

type Logs struct {
	Type string    `json:"type"`
	Data LogsRedis `json:"data"`
}

Logs defines a custom backend with variable settings

func Deserialize added in v0.3.4

func Deserialize(path string) ([]Logs, error)

Deserialize reads json from disks and returns []Logs

type LogsRedis

type LogsRedis struct {
	// Stdout is the redis url for stdout (redis://host/channel)
	Stdout string `json:"stdout"`

	// Stderr is the redis url for stderr (redis://host/channel)
	Stderr string `json:"stderr"`
}

LogsRedis defines how to connect a redis logs backend

Jump to

Keyboard shortcuts

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