Documentation ¶
Index ¶
- Constants
- func NewConsole() (io.Writer, io.Writer, error)
- func NewFile(stdout string, stderr string) (io.Writer, io.Writer, error)
- func NewRedis(stdout string, stderr string) (io.WriteCloser, io.WriteCloser, error)
- func RedisParseURL(address string) (host string, channel string, err error)
- func Serialize(path string, logs []Logs) error
- type Console
- type File
- type Loggers
- type Logs
- type LogsRedis
- type Redis
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 NewConsole ¶
NewConsole does nothing, it's here for consistancy
func NewRedis ¶
func NewRedis(stdout string, stderr string) (io.WriteCloser, io.WriteCloser, error)
NewRedis create new redis backend and initialize connection
func RedisParseURL ¶
RedisParseURL parse an url and returns interresting part after validation
Types ¶
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
Console does nothing else that print logs on console stdout/stderr, there are no config
type File ¶
type File struct {
// contains filtered or unexported fields
}
File write stdout/stderr to files
type Loggers ¶
type Loggers struct {
// contains filtered or unexported fields
}
Loggers keeps stdout and stderr backend list
type Logs ¶
Logs defines a custom backend with variable settings
func Deserialize ¶ added in v0.3.4
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
Click to show internal directories.
Click to hide internal directories.