logs

package
v0.0.0-...-0cfe016 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

It supports http, git and socket urls

Index

Constants

View Source
const (
	FLUENT_KEYS_PREFIX           = KEY_FIELDS
	FLUENT_KEYS_PREFIX_SEPARATOR = DOT_STRING
)
View Source
const (
	FMT_KEYS_PREFIX           = KEY_FIELDS
	FMT_KEYS_PREFIX_SEPARATOR = DOT_STRING
)
View Source
const (
	GELF_KEYS_PREFIX           = KEY_FIELDS
	GELF_KEYS_PREFIX_SEPARATOR = "_"
)
View Source
const (
	GELF_UDP_COMPRESSION_TYPE_GZIP = "gzip"
	GELF_UDP_COMPRESSION_TYPE_ZLIB = "zlib"
	GELF_UDP_COMPRESSION_TYPE_NONE = "none"
)
View Source
const (
	GELF_UDP_COMPRESSION_LEVEL_NO  = int(-1)
	GELF_UDP_COMPRESSION_LEVEL_MIN = int(0)
	GELF_UDP_COMPRESSION_LEVEL_MAX = int(9)
)
View Source
const (
	TEXT_FORMAT     = int(0)
	JSON_FORMAT     = int(1)
	FMT_FORMAT      = int(2)
	GELF_FORMAT     = int(3)
	SYS_FORMAT      = int(4)
	FLUENT_FORMAT   = int(5)
	AWS_FORMAT      = int(6)
	GCP_FORMAT      = int(7)
	SPLUNK_FORMAT   = int(8)
	ENTRIES_FORMAT  = int(9)
	JOURNALD_FORMAT = int(10)
)

Log formats as int

View Source
const (
	PANIC_LEVEL = int(0)
	FATAL_LEVEL = int(1)
	ERROR_LEVEL = int(2)
	WARN_LEVEL  = int(3)
	INFO_LEVEL  = int(4)
	DEBUG_LEVEL = int(5)
	TRACE_LEVEL = int(6)
	// Not have prefix
	PRINT_LEVEL = int(7)
	META_LEVEL  = int(8)
)

Log levels as int

View Source
const (
	PANIC_LEVEL_NAME  = "panic"
	FATAL_LEVEL_NAME  = "fatal"
	ERROR_LEVEL_NAME  = "error"
	WARN_LEVEL_NAME   = "warn"
	INFO_LEVEL_NAME   = "info"
	DEBUG_LEVEL_NAME  = "debug"
	TRACE_LEVEL_NAME  = "trace"
	TRACE_LEVEL_PRINT = "print"
)

Log level namess as string

View Source
const (
	DOT_STRING   = "."
	EMPTY_STRING = ""
	SPACE_STRING = " "
)

Strings

View Source
const (
	TIME_FORMAT_SIMPLE        = "2006-01-02 15:04:05"
	TIME_FORMAT_SIMPLE_MILLI  = "2006-01-02 15:04:05.999"
	TIME_FORMAT_SIMPLE_MICRO  = "2006-01-02 15:04:05.999999"
	TIME_FORMAT_SIMPLE_NANO   = "2006-01-02 15:04:05.999999999"
	TIME_FORMAT_ANSIC         = time.ANSIC
	TIME_FORMAT_UNIX_DATA     = time.UnixDate
	TIME_FORMAT_RUBY_DATA     = time.RubyDate
	TIME_FORMAT_RFC822        = time.RFC822
	TIME_FORMAT_RFC822_Z      = time.RFC822Z
	TIME_FORMAT_RFC850        = time.RFC850
	TIME_FORMAT_RFC1123       = time.RFC1123
	TIME_FORMAT_RFC1123_Z     = time.RFC1123Z
	TIME_FORMAT_RFC3339       = time.RFC3339
	TIME_FORMAT_RFC3339_MILLI = "2006-01-02T15:04:05.999Z07:00"
	TIME_FORMAT_RFC3339_MICRO = "2006-01-02T15:04:05.999999Z07:00"
	TIME_FORMAT_RFC3339_NANO  = time.RFC3339Nano
	TIME_FORMAT_KITCHEN       = time.Kitchen
	TIME_FORMAT_STAMP         = time.Stamp
	TIME_FORMAT_STAMP_MILLI   = time.StampMilli
	TIME_FORMAT_STAMP_MICRO   = time.StampMicro
	TIME_FORMAT_STAMP_NANO    = time.StampNano
)

Default constants of time formats

View Source
const (
	TIME_STAMP_LEVEL_DEFAULT = int(0)
	TIME_STAMP_LEVEL_MILLI   = int(1)
	TIME_STAMP_LEVEL_MICRO   = int(2)
	TIME_STAMP_LEVEL_NANO    = int(3)
)

Default constants of time formats

View Source
const (
	TIME_STAMP_LEVEL_NAME_DEFAULT = "default"
	TIME_STAMP_LEVEL_NAME_MILLI   = "milli"
	TIME_STAMP_LEVEL_NAME_MICRO   = "micro"
	TIME_STAMP_LEVEL_NAME_NANO    = "nano"
)

Default constants of timestamp level names

View Source
const (
	KEY_PATH   = "path"
	KEY_NAME   = "name"
	KEY_VALUE  = "value"
	KEY_FIELDS = "fields"
)

Keys

View Source
const (
	STR_D = "%d"
	STR_F = "%f"
	STR_T = "%t"
	STR_V = "%v"
)
View Source
const (
	JSON_KEYS_PREFIX           = KEY_FIELDS
	JSON_KEYS_PREFIX_SEPARATOR = DOT_STRING
)
View Source
const (
	SYS_DEFAULT_PORT_UDP = 514
	SYS_DEFAULT_PORT_TCP = 6514
)

SYS_DEFAULT_PORTS

View Source
const (
	SYS_FORMAT_UNIX    = "unix"
	SYS_FORMAT_RFC3164 = "rfc3164"
	SYS_FORMAT_RFC5424 = "rfc5424"
)
View Source
const (
	SYS_KEYS_PREFIX           = KEY_FIELDS
	SYS_KEYS_PREFIX_SEPARATOR = DOT_STRING
)
View Source
const (
	TEXT_VARS_SEPARATOR = ":" + SPACE_STRING
	TEXT_VAR_SEPARATOR  = LABELS_SEPARATOR + SPACE_STRING
	TEXT_VAR_EQUALLY    = "="
)
View Source
const (
	URL_TYPE_HTTP   = "http"
	URL_TYPE_SOCKET = "socket"
)
View Source
const (
	URL_PORT_MIN = 1
	URL_PORT_MAX = 65535
)
View Source
const (
	URL_SCHEME_UDP      = "udp"
	URL_SCHEME_TCP      = "tcp"
	URL_SCHEME_TCP_TLS  = "tcp+tls"
	URL_SCHEME_UNIX     = "unix"
	URL_SCHEME_UNIXGRAM = "unixgram"
)
View Source
const (
	URL_HEAD_SEPARATOR = "://"
	URL_PORT_SEPARATOR = ":"
)
View Source
const FLUENT_NAME = "fluent"

FLUENT_NAME

View Source
const FMT_NAME = "fmtlog"

FMT_NAME

View Source
const GELF_DEFAULT_PORT = 12201

GELF_DEFAULT_PORT

View Source
const GELF_NAME = "gelf"

GELF_NAME

View Source
const GELF_PROTOCOL_VERSION = "1.1"

GELF_PROTOCOL_VERSION

View Source
const JSON_NAME = "json"

JSON_NAME

View Source
const LABELS_SEPARATOR = ","
View Source
const NAME = "Logs"

Name

View Source
const SYS_NAME = "syslog"

SYS_NAME

View Source
const TEXT_NAME = "text"

TEXT_NAME

Variables

This section is empty.

Functions

func Close

func Close()

Close

func ColorString

func ColorString(level int, s string, isColorize bool) string

ColorString

func Debug

func Debug(s string)

Debug

func Debugf

func Debugf(s string, i ...interface{})

Debugf

func Debugln

func Debugln(i ...interface{})

Debugln

func Debugv

func Debugv(s string, v Vars)

Debugv

func Environment

func Environment() string

Environment

func Error

func Error(err error)

Error

func Errorf

func Errorf(e error, i ...interface{})

Errorf

func Errorln

func Errorln(i ...interface{})

Errorln

func Errorv

func Errorv(e error, v Vars)

Errorv

func Fatal

func Fatal(err error)

Fatal

func Fatalf

func Fatalf(e error, i ...interface{})

Fatalf

func Fatalln

func Fatalln(i ...interface{})

Fatalln

func Fatalv

func Fatalv(e error, v Vars)

Fatalv

func Format

func Format() int

Format

func FormatNames

func FormatNames() []string

FormatNames

func Formats

func Formats() []int

Formats

func Info

func Info(s string)

Info

func Infof

func Infof(s string, i ...interface{})

Infof

func Infoln

func Infoln(i ...interface{})

Infoln

func Infov

func Infov(s string, v Vars)

Infov

func IsFormat

func IsFormat(f int) bool

IsFormat

func IsFormatName

func IsFormatName(f string) bool

IsFormatName

func IsHTTP

func IsHTTP(s string) bool

IsHTTP returns true if the provided str is an HTTP(S) URL.

func IsLevel

func IsLevel(l int) bool

IsLevel

func IsLevelName

func IsLevelName(l string) bool

IsLevelName

func IsScheme

func IsScheme(s string) bool

IsScheme

func IsSocket

func IsSocket(s string) bool

IsSocket returns true if the string is a socket (udp, tcp, tcp+tls, unix, unixgram) URL.

func IsTimeStamp

func IsTimeStamp() bool

IsTimeStamp

func IsTimeStampLevel

func IsTimeStampLevel(l int) bool

IsTimeStampLevel

func IsTimeStampLevelName

func IsTimeStampLevelName(l string) bool

IsTimeStampLevelName

func IsTimeUTC

func IsTimeUTC() bool

IsTimeUTC

func LabelsSeparator

func LabelsSeparator() string

LabelsSeparator

func LabelsString

func LabelsString() string

LabelsString

func LabelsToSlice

func LabelsToSlice(l string) []string

LabelsToSlice

func LabelsToString

func LabelsToString(l []string) string

LabelsToString

func Level

func Level() int

Level

func LevelName

func LevelName() string

LevelName

func LevelNames

func LevelNames() []string

LevelNames

func Levels

func Levels() []int

Levels

func Panic

func Panic(err error)

Panic

func Panicf

func Panicf(e error, i ...interface{})

Panicf

func Panicln

func Panicln(i ...interface{})

Panicln

func Panicv

func Panicv(e error, v Vars)

Panicv

func Print

func Print(s string)

Print

func Printf

func Printf(s string, i ...interface{})

Printf

func Println

func Println(i ...interface{})

Println

func Printv

func Printv(s string, v Vars)

Printv

func SetEnvironment

func SetEnvironment(s string)

SetEnvironment

func SetFormat

func SetFormat(f int) error

SetFormat

func SetFormatName

func SetFormatName(f string) error

SetFormatName

func SetLabels

func SetLabels(l string)

SetLabels

func SetLabelsSeparator

func SetLabelsSeparator(s string)

SetLabelsSeparator

func SetLevel

func SetLevel(l int) error

SetLevel

func SetLevelName

func SetLevelName(l string) error

SetLevelName

func SetTag

func SetTag(t string)

SetTag

func SetTimeFormat

func SetTimeFormat(f string)

SetTimeFormat

func SetTimeStamp

func SetTimeStamp(t bool)

SetTimeStamp

func SetTimeStampLevel

func SetTimeStampLevel(l int) error

SetTimeStampLevel

func SetTimeStampLevelName

func SetTimeStampLevelName(l string) error

SetTimeStampLevelName

func SetTimeUTC

func SetTimeUTC(u bool)

SetTimeUTC

func SocketAddress

func SocketAddress(c *Connection, udpPort int, tcpPort int) error

SocketAddress

func SocketAddressBuild

func SocketAddressBuild(c *Connection) string

SocketAddressBuild

func SocketConnection

func SocketConnection(c *Connection, udpPort int, tcpPort int) error

SocketConnection

func SocketScheme

func SocketScheme(c *Connection) error

SocketScheme

func SocketURL

func SocketURL(c *Connection, udpPort int, tcpPort int) error

SocketURL

func SocketURLBuild

func SocketURLBuild(c *Connection) string

SocketURLBuild

func StrBool

func StrBool(v bool) string

StrBool

func StrFloat32

func StrFloat32(v float32) string

StrFloat32

func StrFloat64

func StrFloat64(v float64) string

StrFloat64

func StrInt

func StrInt(v int) string

StrInt

func StrInt16

func StrInt16(v int16) string

StrInt16

func StrInt32

func StrInt32(v int32) string

StrInt32

func StrInt64

func StrInt64(v int64) string

StrInt64

func StrInt8

func StrInt8(v int8) string

StrInt8

func StrUInt

func StrUInt(v uint) string

StrUInt

func StrUInt16

func StrUInt16(v uint16) string

StrUInt16

func StrUInt32

func StrUInt32(v uint32) string

StrUInt32

func StrUInt64

func StrUInt64(v uint64) string

StrUInt64

func StrUInt8

func StrUInt8(v uint8) string

StrUInt8

func StrV

func StrV(v interface{}) string

StrV

func StringColors

func StringColors() []string

StringColors

func TCPTLSCheck

func TCPTLSCheck(t *TCPTLS) error

TCPTLSCheck

func TCPTLSConfig

func TCPTLSConfig(t *TCPTLS) (*tls.Config, error)

TCPTLSConfig

func Tag

func Tag() string

Tag

func TimeFormat

func TimeFormat() string

TimeFormat

func TimeStampLevel

func TimeStampLevel() int

TimeStampLevel

func TimeStampLevelName

func TimeStampLevelName() string

TimeStampLevelName

func TimeStampLevelNames

func TimeStampLevelNames() []string

TimeStampLevelNames

func TimeStampLevels

func TimeStampLevels() []int

TimeStampLevels

func Trace

func Trace(s string)

Trace

func Tracef

func Tracef(s string, i ...interface{})

Tracef

func Traceln

func Traceln(i ...interface{})

Traceln

func Tracev

func Tracev(s string, v Vars)

Tracev

func Warn

func Warn(s string)

Warn

func Warnf

func Warnf(s string, i ...interface{})

Warnf

func Warnln

func Warnln(i ...interface{})

Warnln

func Warnv

func Warnv(s string, v Vars)

Warnv

Types

type Connection

type Connection struct {
	URL          string `json:"url" yaml:"url" xml:"url" toml:"url"`
	Scheme       string `json:"scheme" yaml:"scheme" xml:"scheme" toml:"scheme"`
	Address      string `json:"address" yaml:"address" xml:"address" toml:"address"`
	Host         string `json:"host" yaml:"host" xml:"host" toml:"host"`
	Port         int    `json:"port" yaml:"port" xml:"port" toml:"port"`
	SocketPath   string `json:"socket_path" yaml:"socket_path" xml:"socket_path" toml:"socket_path"`
	Timeout      int    `json:"timeout" yaml:"timeout" xml:"timeout" toml:"timeout"`
	WriteTimeout int    `json:"write_timeout" yaml:"write_timeout" xml:"write_timeout" toml:"write_timeout"`
	RetryWait    int    `json:"retry_wait" yaml:"retry_wait" xml:"retry_wait" toml:"retry_wait"`
	MaxRetry     int    `json:"max_retry" yaml:"max_retry" xml:"max_retry" toml:"max_retry"`
	MaxRetryWait int    `json:"max_retry_wait" yaml:"max_retry_wait" xml:"max_retry_wait" toml:"max_retry_wait"`
	BufferLimit  int    `json:"buffer_limit" yaml:"buffer_limit" xml:"buffer_limit" toml:"buffer_limit"`
	IsAsync      bool   `json:"is_async" yaml:"is_async" xml:"is_async" toml:"is_async"`
}

Connection

type FMT

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

FMT

func NewFMT

func NewFMT(s *FMTSettings, f ...*Formatter) (*FMT, error)

NewFMT

func (*FMT) Close

func (f *FMT) Close() error

Close

func (*FMT) Debug

func (f *FMT) Debug(m string)

Debug

func (*FMT) Debugf

func (f *FMT) Debugf(m string, i ...interface{})

Debugf

func (*FMT) Debugln

func (f *FMT) Debugln(i ...interface{})

Debugln

func (*FMT) Debugv

func (f *FMT) Debugv(m string, v Vars)

Debugv

func (*FMT) Environment

func (f *FMT) Environment() string

Environment

func (*FMT) Error

func (f *FMT) Error(e error)

Error

func (*FMT) Errorf

func (f *FMT) Errorf(e error, i ...interface{})

Errorf

func (*FMT) Errorln

func (f *FMT) Errorln(i ...interface{})

Errorln

func (*FMT) Errorv

func (f *FMT) Errorv(e error, v Vars)

Errorv

func (*FMT) Fatal

func (f *FMT) Fatal(e error)

Fatal

func (*FMT) Fatalf

func (f *FMT) Fatalf(e error, i ...interface{})

Fatalf

func (*FMT) Fatalln

func (f *FMT) Fatalln(i ...interface{})

Fatalln

func (*FMT) Fatalv

func (f *FMT) Fatalv(e error, v Vars)

Fatalv

func (*FMT) Format

func (f *FMT) Format() int

Format

func (*FMT) FormatName

func (f *FMT) FormatName() string

FormatName

func (*FMT) Info

func (f *FMT) Info(m string)

Info

func (*FMT) Infof

func (f *FMT) Infof(m string, i ...interface{})

Infof

func (*FMT) Infoln

func (f *FMT) Infoln(i ...interface{})

Infoln

func (*FMT) Infov

func (f *FMT) Infov(m string, v Vars)

Infov

func (*FMT) IsLevel

func (f *FMT) IsLevel(l int) bool

IsLevel

func (*FMT) IsLevelName

func (f *FMT) IsLevelName(l string) bool

IsLevelName

func (*FMT) IsTimeStamp

func (f *FMT) IsTimeStamp() bool

IsTimeStamp

func (*FMT) IsTimeStampLevel

func (f *FMT) IsTimeStampLevel(l int) bool

IsTimeStampLevel

func (*FMT) IsTimeStampLevelName

func (f *FMT) IsTimeStampLevelName(l string) bool

IsTimeStampLevelName

func (*FMT) IsTimeUTC

func (f *FMT) IsTimeUTC() bool

IsTimeUTC

func (*FMT) Labels

func (f *FMT) Labels() string

Labels

func (*FMT) LabelsSeparator

func (f *FMT) LabelsSeparator() string

LabelsSeparator

func (*FMT) LabelsToSlice

func (f *FMT) LabelsToSlice(l string) []string

LabelsToSlice

func (*FMT) LabelsToString

func (f *FMT) LabelsToString(l []string) string

LabelsToString

func (*FMT) Level

func (f *FMT) Level() int

Level

func (*FMT) LevelName

func (f *FMT) LevelName() string

LevelName

func (*FMT) LevelNames

func (f *FMT) LevelNames() []string

LevelNames

func (*FMT) Levels

func (f *FMT) Levels() []int

Levels

func (*FMT) Panic

func (f *FMT) Panic(e error)

Panic

func (*FMT) Panicf

func (f *FMT) Panicf(e error, i ...interface{})

Panicf

func (*FMT) Panicln

func (f *FMT) Panicln(i ...interface{})

Panicln

func (*FMT) Panicv

func (f *FMT) Panicv(e error, v Vars)

Panicv

func (*FMT) Print

func (f *FMT) Print(m string)

Print

func (*FMT) Printf

func (f *FMT) Printf(m string, i ...interface{})

Printf

func (*FMT) Println

func (f *FMT) Println(i ...interface{})

Println

func (*FMT) Printv

func (f *FMT) Printv(m string, v Vars)

Printv

func (*FMT) SetEnvironment

func (f *FMT) SetEnvironment(e string)

SetEnvironment

func (*FMT) SetLabels

func (f *FMT) SetLabels(l string)

SetLabels

func (*FMT) SetLabelsSeparator

func (f *FMT) SetLabelsSeparator(spr string)

SetLabelsSeparator

func (*FMT) SetLevel

func (f *FMT) SetLevel(l int) error

SetLevel

func (*FMT) SetLevelName

func (f *FMT) SetLevelName(l string) error

SetLevelName

func (*FMT) SetTag

func (f *FMT) SetTag(t string)

SetTag

func (*FMT) SetTimeFormat

func (f *FMT) SetTimeFormat(s string)

SetTimeFormat

func (*FMT) SetTimeStamp

func (f *FMT) SetTimeStamp(t bool)

SetTimeStamp

func (*FMT) SetTimeStampLevel

func (f *FMT) SetTimeStampLevel(l int) error

SetTimeStampLevel

func (*FMT) SetTimeStampLevelName

func (f *FMT) SetTimeStampLevelName(l string) error

SetTimeStampLevelName

func (*FMT) SetTimeUTC

func (f *FMT) SetTimeUTC(u bool)

SetTimeUTC

func (*FMT) Tag

func (f *FMT) Tag() string

Tag

func (*FMT) TimeFormat

func (f *FMT) TimeFormat() string

TimeFormat

func (*FMT) TimeStampLevel

func (f *FMT) TimeStampLevel() int

TimeStampLevel

func (*FMT) TimeStampLevelName

func (f *FMT) TimeStampLevelName() string

TimeStampLevelName

func (*FMT) TimeStampLevelNames

func (f *FMT) TimeStampLevelNames() []string

TimeStampLevelNames

func (*FMT) TimeStampLevels

func (f *FMT) TimeStampLevels() []int

TimeStampLevels

func (*FMT) Trace

func (f *FMT) Trace(m string)

Trace

func (*FMT) Tracef

func (f *FMT) Tracef(m string, i ...interface{})

Tracef

func (*FMT) Traceln

func (f *FMT) Traceln(i ...interface{})

Traceln

func (*FMT) Tracev

func (f *FMT) Tracev(m string, v Vars)

Tracev

func (*FMT) Warn

func (f *FMT) Warn(s string)

Warn

func (*FMT) Warnf

func (f *FMT) Warnf(m string, i ...interface{})

Warnf

func (*FMT) Warnln

func (f *FMT) Warnln(i ...interface{})

Warnln

func (*FMT) Warnv

func (f *FMT) Warnv(m string, v Vars)

Warnv

type FMTSettings

type FMTSettings struct {
}

FMTSettings

type Fluent

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

Fluent

func NewFluent

func NewFluent(s *FluentSettings, f ...*Formatter) (*Fluent, error)

NewFluent

func (*Fluent) Close

func (f *Fluent) Close() error

Close

func (*Fluent) Debug

func (f *Fluent) Debug(m string)

Debug

func (*Fluent) Debugf

func (f *Fluent) Debugf(m string, i ...interface{})

Debugf

func (*Fluent) Debugln

func (f *Fluent) Debugln(i ...interface{})

Debugln

func (*Fluent) Debugv

func (f *Fluent) Debugv(m string, v Vars)

Debugv

func (*Fluent) Environment

func (f *Fluent) Environment() string

Environment

func (*Fluent) Error

func (f *Fluent) Error(e error)

Error

func (*Fluent) Errorf

func (f *Fluent) Errorf(e error, i ...interface{})

Errorf

func (*Fluent) Errorln

func (f *Fluent) Errorln(i ...interface{})

Errorln

func (*Fluent) Errorv

func (f *Fluent) Errorv(e error, v Vars)

Errorv

func (*Fluent) Fatal

func (f *Fluent) Fatal(e error)

Fatal

func (*Fluent) Fatalf

func (f *Fluent) Fatalf(e error, i ...interface{})

Fatalf

func (*Fluent) Fatalln

func (f *Fluent) Fatalln(i ...interface{})

Fatalln

func (*Fluent) Fatalv

func (f *Fluent) Fatalv(e error, v Vars)

Fatalv

func (*Fluent) Format

func (f *Fluent) Format() int

Format

func (*Fluent) FormatName

func (f *Fluent) FormatName() string

FormatName

func (*Fluent) Info

func (f *Fluent) Info(m string)

Info

func (*Fluent) Infof

func (f *Fluent) Infof(m string, i ...interface{})

Infof

func (*Fluent) Infoln

func (f *Fluent) Infoln(i ...interface{})

Infoln

func (*Fluent) Infov

func (f *Fluent) Infov(m string, v Vars)

Infov

func (*Fluent) IsLevel

func (f *Fluent) IsLevel(l int) bool

IsLevel

func (*Fluent) IsLevelName

func (f *Fluent) IsLevelName(l string) bool

IsLevelName

func (*Fluent) IsTimeStamp

func (f *Fluent) IsTimeStamp() bool

IsTimeStamp

func (*Fluent) IsTimeStampLevel

func (f *Fluent) IsTimeStampLevel(l int) bool

IsTimeStampLevel

func (*Fluent) IsTimeStampLevelName

func (f *Fluent) IsTimeStampLevelName(l string) bool

IsTimeStampLevelName

func (*Fluent) IsTimeUTC

func (f *Fluent) IsTimeUTC() bool

IsTimeUTC

func (*Fluent) Labels

func (f *Fluent) Labels() string

Labels

func (*Fluent) LabelsSeparator

func (f *Fluent) LabelsSeparator() string

LabelsSeparator

func (*Fluent) LabelsToSlice

func (f *Fluent) LabelsToSlice(l string) []string

LabelsToSlice

func (*Fluent) LabelsToString

func (f *Fluent) LabelsToString(l []string) string

LabelsToString

func (*Fluent) Level

func (f *Fluent) Level() int

Level

func (*Fluent) LevelName

func (f *Fluent) LevelName() string

LevelName

func (*Fluent) LevelNames

func (f *Fluent) LevelNames() []string

LevelNames

func (*Fluent) Levels

func (f *Fluent) Levels() []int

Levels

func (*Fluent) Panic

func (f *Fluent) Panic(e error)

Panic

func (*Fluent) Panicf

func (f *Fluent) Panicf(e error, i ...interface{})

Panicf

func (*Fluent) Panicln

func (f *Fluent) Panicln(i ...interface{})

Panicln

func (*Fluent) Panicv

func (f *Fluent) Panicv(e error, v Vars)

Panicv

func (*Fluent) Print

func (f *Fluent) Print(m string)

Print

func (*Fluent) Printf

func (f *Fluent) Printf(m string, i ...interface{})

Printf

func (*Fluent) Println

func (f *Fluent) Println(i ...interface{})

Println

func (*Fluent) Printv

func (f *Fluent) Printv(m string, v Vars)

Printv

func (*Fluent) SetEnvironment

func (f *Fluent) SetEnvironment(e string)

SetEnvironment

func (*Fluent) SetLabels

func (f *Fluent) SetLabels(l string)

SetLabels

func (*Fluent) SetLabelsSeparator

func (f *Fluent) SetLabelsSeparator(spr string)

SetLabelsSeparator

func (*Fluent) SetLevel

func (f *Fluent) SetLevel(l int) error

SetLevel

func (*Fluent) SetLevelName

func (f *Fluent) SetLevelName(l string) error

SetLevelName

func (*Fluent) SetTag

func (f *Fluent) SetTag(t string)

SetTag

func (*Fluent) SetTimeFormat

func (f *Fluent) SetTimeFormat(s string)

SetTimeFormat

func (*Fluent) SetTimeStamp

func (f *Fluent) SetTimeStamp(t bool)

SetTimeStamp

func (*Fluent) SetTimeStampLevel

func (f *Fluent) SetTimeStampLevel(l int) error

SetTimeStampLevel

func (*Fluent) SetTimeStampLevelName

func (f *Fluent) SetTimeStampLevelName(l string) error

SetTimeStampLevelName

func (*Fluent) SetTimeUTC

func (f *Fluent) SetTimeUTC(u bool)

SetTimeUTC

func (*Fluent) Tag

func (f *Fluent) Tag() string

Tag

func (*Fluent) TimeFormat

func (f *Fluent) TimeFormat() string

TimeFormat

func (*Fluent) TimeStampLevel

func (f *Fluent) TimeStampLevel() int

TimeStampLevel

func (*Fluent) TimeStampLevelName

func (f *Fluent) TimeStampLevelName() string

TimeStampLevelName

func (*Fluent) TimeStampLevelNames

func (f *Fluent) TimeStampLevelNames() []string

TimeStampLevelNames

func (*Fluent) TimeStampLevels

func (f *Fluent) TimeStampLevels() []int

TimeStampLevels

func (*Fluent) Trace

func (f *Fluent) Trace(m string)

Trace

func (*Fluent) Tracef

func (f *Fluent) Tracef(m string, i ...interface{})

Tracef

func (*Fluent) Traceln

func (f *Fluent) Traceln(i ...interface{})

Traceln

func (*Fluent) Tracev

func (f *Fluent) Tracev(m string, v Vars)

Tracev

func (*Fluent) Warn

func (f *Fluent) Warn(s string)

Warn

func (*Fluent) Warnf

func (f *Fluent) Warnf(m string, i ...interface{})

Warnf

func (*Fluent) Warnln

func (f *Fluent) Warnln(i ...interface{})

Warnln

func (*Fluent) Warnv

func (f *Fluent) Warnv(m string, v Vars)

Warnv

type FluentSettings

type FluentSettings struct {
}

FluentSettings

type Formatter

type Formatter struct {
	Stdout      *StdOE  `json:"stdout" yaml:"stdout" xml:"stdout" toml:"stdout"`
	Stderr      *StdOE  `json:"stderr" yaml:"stderr" xml:"stderr" toml:"stderr"`
	Level       int     `json:"level" yaml:"level" xml:"level" toml:"level"`
	Labels      *Labels `json:"labels" yaml:"labels" xml:"labels" toml:"labels"`
	Time        *Time   `json:"time" yaml:"time" xml:"time" toml:"time"`
	Environment string  `json:"environment" yaml:"environment" xml:"environment" toml:"environment"`
	Tag         string  `json:"tag" yaml:"tag" xml:"tag" toml:"tag"`
	Keys        *Keys   `json:"keys" yaml:"keys" xml:"keys" toml:"keys"`
}

Formatter

type GELF

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

GELF

func NewGELF

func NewGELF(s *GELFSettings, f ...*Formatter) (*GELF, error)

NewGELF

func (*GELF) Close

func (g *GELF) Close() error

Close

func (*GELF) Debug

func (g *GELF) Debug(s string)

Debug

func (*GELF) Debugf

func (g *GELF) Debugf(s string, i ...interface{})

Debugf

func (*GELF) Debugln

func (g *GELF) Debugln(i ...interface{})

Debugln

func (*GELF) Debugv

func (g *GELF) Debugv(s string, v Vars)

Debugv

func (*GELF) Environment

func (g *GELF) Environment() string

Environment

func (*GELF) Error

func (g *GELF) Error(e error)

Error

func (*GELF) Errorf

func (g *GELF) Errorf(e error, i ...interface{})

Errorf

func (*GELF) Errorln

func (g *GELF) Errorln(i ...interface{})

Errorln

func (*GELF) Errorv

func (g *GELF) Errorv(e error, v Vars)

Errorv

func (*GELF) Fatal

func (g *GELF) Fatal(e error)

Fatal

func (*GELF) Fatalf

func (g *GELF) Fatalf(e error, i ...interface{})

Fatalf

func (*GELF) Fatalln

func (g *GELF) Fatalln(i ...interface{})

Fatalln

func (*GELF) Fatalv

func (g *GELF) Fatalv(e error, v Vars)

Fatalv

func (*GELF) Format

func (g *GELF) Format() int

Format

func (*GELF) FormatName

func (g *GELF) FormatName() string

FormatName

func (*GELF) Info

func (g *GELF) Info(s string)

Info

func (*GELF) Infof

func (g *GELF) Infof(s string, i ...interface{})

Infof

func (*GELF) Infoln

func (g *GELF) Infoln(i ...interface{})

Infoln

func (*GELF) Infov

func (g *GELF) Infov(s string, v Vars)

Infov

func (*GELF) IsLevel

func (g *GELF) IsLevel(l int) bool

IsLevel

func (*GELF) IsLevelName

func (g *GELF) IsLevelName(l string) bool

IsLevelName

func (*GELF) IsTimeStamp

func (g *GELF) IsTimeStamp() bool

IsTimeStamp

func (*GELF) IsTimeStampLevel

func (g *GELF) IsTimeStampLevel(l int) bool

IsTimeStampLevel

func (*GELF) IsTimeStampLevelName

func (g *GELF) IsTimeStampLevelName(l string) bool

IsTimeStampLevelName

func (*GELF) IsTimeUTC

func (g *GELF) IsTimeUTC() bool

IsTimeUTC

func (*GELF) Labels

func (g *GELF) Labels() string

Labels

func (*GELF) LabelsSeparator

func (g *GELF) LabelsSeparator() string

LabelsSeparator

func (*GELF) LabelsToSlice

func (g *GELF) LabelsToSlice(l string) []string

LabelsToSlice

func (*GELF) LabelsToString

func (g *GELF) LabelsToString(l []string) string

LabelsToString

func (*GELF) Level

func (g *GELF) Level() int

Level

func (*GELF) LevelName

func (g *GELF) LevelName() string

LevelName

func (*GELF) LevelNames

func (g *GELF) LevelNames() []string

LevelNames

func (*GELF) Levels

func (g *GELF) Levels() []int

Levels

func (*GELF) Panic

func (g *GELF) Panic(e error)

Panic

func (*GELF) Panicf

func (g *GELF) Panicf(e error, i ...interface{})

Panicf

func (*GELF) Panicln

func (g *GELF) Panicln(i ...interface{})

Panicln

func (*GELF) Panicv

func (g *GELF) Panicv(e error, v Vars)

Panicv

func (*GELF) Print

func (g *GELF) Print(s string)

Print

func (*GELF) Printf

func (g *GELF) Printf(s string, i ...interface{})

Printf

func (*GELF) Println

func (g *GELF) Println(i ...interface{})

Println

func (*GELF) Printv

func (g *GELF) Printv(s string, v Vars)

Printv

func (*GELF) SetEnvironment

func (g *GELF) SetEnvironment(e string)

SetEnvironment

func (*GELF) SetLabels

func (g *GELF) SetLabels(l string)

SetLabels

func (*GELF) SetLabelsSeparator

func (g *GELF) SetLabelsSeparator(s string)

SetLabelsSeparator

func (*GELF) SetLevel

func (g *GELF) SetLevel(l int) error

SetLevel

func (*GELF) SetLevelName

func (g *GELF) SetLevelName(l string) error

SetLevelName

func (*GELF) SetTag

func (g *GELF) SetTag(t string)

SetTag

func (*GELF) SetTimeFormat

func (g *GELF) SetTimeFormat(f string)

SetTimeFormat

func (*GELF) SetTimeStamp

func (g *GELF) SetTimeStamp(t bool)

SetTimeStamp

func (*GELF) SetTimeStampLevel

func (g *GELF) SetTimeStampLevel(l int) error

SetTimeStampLevel

func (*GELF) SetTimeStampLevelName

func (g *GELF) SetTimeStampLevelName(l string) error

SetTimeStampLevelName

func (*GELF) SetTimeUTC

func (g *GELF) SetTimeUTC(u bool)

SetTimeUTC

func (*GELF) Tag

func (g *GELF) Tag() string

Tag

func (*GELF) TimeFormat

func (g *GELF) TimeFormat() string

TimeFormat

func (*GELF) TimeStampLevel

func (g *GELF) TimeStampLevel() int

TimeStampLevel

func (*GELF) TimeStampLevelName

func (g *GELF) TimeStampLevelName() string

TimeStampLevelName

func (*GELF) TimeStampLevelNames

func (g *GELF) TimeStampLevelNames() []string

TimeStampLevelNames

func (*GELF) TimeStampLevels

func (g *GELF) TimeStampLevels() []int

TimeStampLevels

func (*GELF) Trace

func (g *GELF) Trace(s string)

Trace

func (*GELF) Tracef

func (g *GELF) Tracef(s string, i ...interface{})

Tracef

func (*GELF) Traceln

func (g *GELF) Traceln(i ...interface{})

Traceln

func (*GELF) Tracev

func (g *GELF) Tracev(s string, v Vars)

Tracev

func (*GELF) Warn

func (g *GELF) Warn(s string)

Warn

func (*GELF) Warnf

func (g *GELF) Warnf(s string, i ...interface{})

Warnf

func (*GELF) Warnln

func (g *GELF) Warnln(i ...interface{})

Warnln

func (*GELF) Warnv

func (g *GELF) Warnv(s string, v Vars)

Warnv

type GELFSettings

type GELFSettings struct {
	Connection *Connection `json:"connection" yaml:"connection" xml:"connection" toml:"connection"`
	Hostname   string      `json:"hostname" yaml:"hostname" xml:"hostname" toml:"hostname"`
	Facility   string      `json:"facility" yaml:"facility" xml:"facility" toml:"facility"`
	UDP        *GELFUDP    `json:"udp" yaml:"udp" xml:"udp" toml:"udp"`
	TCP        *GELFTCP    `json:"tcp" yaml:"tcp" xml:"tcp" toml:"tcp"`
}

GELFSettings

type GELFTCP

type GELFTCP struct {
	Reconnection *GELFTCPReconnection `json:"reconnection" yaml:"reconnection" xml:"reconnection" toml:"reconnection"`
	TLS          *TCPTLS              `json:"tls" yaml:"tls" xml:"tls" toml:"tls"`
}

GELFTCP

type GELFTCPReconnection

type GELFTCPReconnection struct {
	Max   int `json:"max" yaml:"max" xml:"max" toml:"max"`
	Delay int `json:"delay" yaml:"delay" xml:"delay" toml:"delay"`
}

GELFTCPReconnection

type GELFUDP

type GELFUDP struct {
	Compression *GELFUDPCompression `json:"compression" yaml:"compression" xml:"compression" toml:"compression"`
}

GELFUDP

type GELFUDPCompression

type GELFUDPCompression struct {
	Type  string `json:"type" yaml:"type" xml:"type" toml:"type"`
	Level int    `json:"level" yaml:"level" xml:"level" toml:"level"`
}

GELFUDPCompression

type JSON

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

JSON

func NewJSON

func NewJSON(s *JSONSettings, f ...*Formatter) (*JSON, error)

NewJSON

func (*JSON) Close

func (j *JSON) Close() error

Close

func (*JSON) Debug

func (j *JSON) Debug(s string)

Debug

func (*JSON) Debugf

func (j *JSON) Debugf(s string, i ...interface{})

Debugf

func (*JSON) Debugln

func (j *JSON) Debugln(i ...interface{})

Debugln

func (*JSON) Debugv

func (j *JSON) Debugv(s string, v Vars)

Debugv

func (*JSON) Environment

func (j *JSON) Environment() string

Environment

func (*JSON) Error

func (j *JSON) Error(e error)

Error

func (*JSON) Errorf

func (j *JSON) Errorf(e error, i ...interface{})

Errorf

func (*JSON) Errorln

func (j *JSON) Errorln(i ...interface{})

Errorln

func (*JSON) Errorv

func (j *JSON) Errorv(e error, v Vars)

Errorv

func (*JSON) Fatal

func (j *JSON) Fatal(e error)

Fatal

func (*JSON) Fatalf

func (j *JSON) Fatalf(e error, i ...interface{})

Fatalf

func (*JSON) Fatalln

func (j *JSON) Fatalln(i ...interface{})

Fatalln

func (*JSON) Fatalv

func (j *JSON) Fatalv(e error, v Vars)

Fatalv

func (*JSON) Format

func (j *JSON) Format() int

Format

func (*JSON) FormatName

func (j *JSON) FormatName() string

FormatName

func (*JSON) Info

func (j *JSON) Info(s string)

Info

func (*JSON) Infof

func (j *JSON) Infof(s string, i ...interface{})

Infof

func (*JSON) Infoln

func (j *JSON) Infoln(i ...interface{})

Infoln

func (*JSON) Infov

func (j *JSON) Infov(s string, v Vars)

Infov

func (*JSON) IsLevel

func (j *JSON) IsLevel(l int) bool

IsLevel

func (*JSON) IsLevelName

func (j *JSON) IsLevelName(l string) bool

IsLevelName

func (*JSON) IsTimeStamp

func (j *JSON) IsTimeStamp() bool

IsTimeStamp

func (*JSON) IsTimeStampLevel

func (j *JSON) IsTimeStampLevel(l int) bool

IsTimeStampLevel

func (*JSON) IsTimeStampLevelName

func (j *JSON) IsTimeStampLevelName(l string) bool

IsTimeStampLevelName

func (*JSON) IsTimeUTC

func (j *JSON) IsTimeUTC() bool

IsTimeUTC

func (*JSON) Labels

func (j *JSON) Labels() string

Labels

func (*JSON) LabelsSeparator

func (j *JSON) LabelsSeparator() string

LabelsSeparator

func (*JSON) LabelsToSlice

func (j *JSON) LabelsToSlice(l string) []string

LabelsToSlice

func (*JSON) LabelsToString

func (j *JSON) LabelsToString(l []string) string

LabelsToString

func (*JSON) Level

func (j *JSON) Level() int

Level

func (*JSON) LevelName

func (j *JSON) LevelName() string

LevelName

func (*JSON) LevelNames

func (j *JSON) LevelNames() []string

LevelNames

func (*JSON) Levels

func (j *JSON) Levels() []int

Levels

func (*JSON) Panic

func (j *JSON) Panic(e error)

Panic

func (*JSON) Panicf

func (j *JSON) Panicf(e error, i ...interface{})

Panicf

func (*JSON) Panicln

func (j *JSON) Panicln(i ...interface{})

Panicln

func (*JSON) Panicv

func (j *JSON) Panicv(e error, v Vars)

Panicv

func (*JSON) Print

func (j *JSON) Print(s string)

Print

func (*JSON) Printf

func (j *JSON) Printf(s string, i ...interface{})

Printf

func (*JSON) Println

func (j *JSON) Println(i ...interface{})

Println

func (*JSON) Printv

func (j *JSON) Printv(s string, v Vars)

Printv

func (*JSON) SetEnvironment

func (j *JSON) SetEnvironment(e string)

SetEnvironment

func (*JSON) SetLabels

func (j *JSON) SetLabels(l string)

SetLabels

func (*JSON) SetLabelsSeparator

func (j *JSON) SetLabelsSeparator(s string)

SetLabelsSeparator

func (*JSON) SetLevel

func (j *JSON) SetLevel(l int) error

SetLevel

func (*JSON) SetLevelName

func (j *JSON) SetLevelName(l string) error

SetLevelName

func (*JSON) SetTag

func (j *JSON) SetTag(t string)

SetTag

func (*JSON) SetTimeFormat

func (j *JSON) SetTimeFormat(f string)

SetTimeFormat

func (*JSON) SetTimeStamp

func (j *JSON) SetTimeStamp(t bool)

SetTimeStamp

func (*JSON) SetTimeStampLevel

func (j *JSON) SetTimeStampLevel(l int) error

SetTimeStampLevel

func (*JSON) SetTimeStampLevelName

func (j *JSON) SetTimeStampLevelName(l string) error

SetTimeStampLevelName

func (*JSON) SetTimeUTC

func (j *JSON) SetTimeUTC(u bool)

SetTimeUTC

func (*JSON) Tag

func (j *JSON) Tag() string

Tag

func (*JSON) TimeFormat

func (j *JSON) TimeFormat() string

TimeFormat

func (*JSON) TimeStampLevel

func (j *JSON) TimeStampLevel() int

TimeStampLevel

func (*JSON) TimeStampLevelName

func (j *JSON) TimeStampLevelName() string

TimeStampLevelName

func (*JSON) TimeStampLevelNames

func (j *JSON) TimeStampLevelNames() []string

TimeStampLevelNames

func (*JSON) TimeStampLevels

func (j *JSON) TimeStampLevels() []int

TimeStampLevels

func (*JSON) Trace

func (j *JSON) Trace(s string)

Trace

func (*JSON) Tracef

func (j *JSON) Tracef(s string, i ...interface{})

Tracef

func (*JSON) Traceln

func (j *JSON) Traceln(i ...interface{})

Traceln

func (*JSON) Tracev

func (j *JSON) Tracev(s string, v Vars)

Tracev

func (*JSON) Warn

func (j *JSON) Warn(s string)

Warn

func (*JSON) Warnf

func (j *JSON) Warnf(s string, i ...interface{})

Warnf

func (*JSON) Warnln

func (j *JSON) Warnln(i ...interface{})

Warnln

func (*JSON) Warnv

func (j *JSON) Warnv(s string, v Vars)

Warnv

type JSONKeys

type JSONKeys struct {
	Level       string `json:"level" yaml:"level" xml:"level" toml:"level"`
	Labels      string `json:"labels" yaml:"labels" xml:"labels" toml:"labels"`
	Message     string `json:"msg" yaml:"msg" xml:"msg" toml:"msg"`
	Time        string `json:"time" yaml:"time" xml:"time" toml:"time"`
	Timestamp   string `json:"timestamp" yaml:"timestamp" xml:"timestamp" toml:"timestamp"`
	Environment string `json:"environment" yaml:"environment" xml:"environment" toml:"environment"`
	Tag         string `json:"tag" yaml:"tag" xml:"tag" toml:"tag"`
}

JSONKeys

type JSONSettings

type JSONSettings struct {
	KeysPrefix          string    `json:"keys_prefix" yaml:"keys_prefix" xml:"keys_prefix" toml:"keys_prefix"`
	KeysPrefixSeparator string    `json:"keys_prefix_separator" yaml:"keys_prefix_separator" xml:"keys_prefix_separator" toml:"keys_prefix_separator"`
	Keys                *JSONKeys `json:"keys" yaml:"keys" xml:"keys" toml:"keys"`
}

JSONSettings

type Keys

type Keys struct {
	Names           *KeysNames `json:"names" yaml:"names" xml:"names" toml:"names"`
	Prefix          string     `json:"prefix" yaml:"prefix" xml:"prefix" toml:"prefix"`
	PrefixSeparator string     `json:"prefix_separator" yaml:"prefix_separator" xml:"prefix_separator" toml:"prefix_separator"`
}

Keys

type KeysNames

type KeysNames struct {
	Level       string `json:"level" yaml:"level" xml:"level" toml:"level"`
	Labels      string `json:"labels" yaml:"labels" xml:"labels" toml:"labels"`
	Message     string `json:"msg" yaml:"msg" xml:"msg" toml:"msg"`
	Time        string `json:"time" yaml:"time" xml:"time" toml:"time"`
	Timestamp   string `json:"timestamp" yaml:"timestamp" xml:"timestamp" toml:"timestamp"`
	Environment string `json:"environment" yaml:"environment" xml:"environment" toml:"environment"`
	Tag         string `json:"tag" yaml:"tag" xml:"tag" toml:"tag"`
}

KeysNames

type Labels

type Labels struct {
	String    string `json:"string" yaml:"string" xml:"string" toml:"string"`
	Separator string `json:"separator" yaml:"separator" xml:"separator" toml:"separator"`
}

Labels

type Logs

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

Logs

func New

func New(f ...*Formatter) (*Logs, error)

New

func (*Logs) Close

func (ls *Logs) Close() error

Close

func (*Logs) Debug

func (ls *Logs) Debug(s string)

Debug

func (*Logs) Debugf

func (ls *Logs) Debugf(s string, i ...interface{})

Debugf

func (*Logs) Debugln

func (ls *Logs) Debugln(i ...interface{})

Debugln

func (*Logs) Debugv

func (ls *Logs) Debugv(s string, v Vars)

Debugv

func (*Logs) Environment

func (ls *Logs) Environment() string

Environment

func (*Logs) Error

func (ls *Logs) Error(e error)

Error

func (*Logs) Errorf

func (ls *Logs) Errorf(e error, i ...interface{})

Errorf

func (*Logs) Errorln

func (ls *Logs) Errorln(i ...interface{})

Errorln

func (*Logs) Errorv

func (ls *Logs) Errorv(e error, v Vars)

Errorv

func (*Logs) Fatal

func (ls *Logs) Fatal(e error)

Fatal

func (*Logs) Fatalf

func (ls *Logs) Fatalf(e error, i ...interface{})

Fatalf

func (*Logs) Fatalln

func (ls *Logs) Fatalln(i ...interface{})

Fatalln

func (*Logs) Fatalv

func (ls *Logs) Fatalv(e error, v Vars)

Fatalv

func (*Logs) Format

func (ls *Logs) Format() int

Format

func (*Logs) FormatName

func (ls *Logs) FormatName() string

FormatName

func (*Logs) FormatNames

func (ls *Logs) FormatNames() []string

FormatNames

func (*Logs) Formats

func (ls *Logs) Formats() []int

Formats

func (*Logs) Info

func (ls *Logs) Info(s string)

Info

func (*Logs) Infof

func (ls *Logs) Infof(s string, i ...interface{})

Infof

func (*Logs) Infoln

func (ls *Logs) Infoln(i ...interface{})

Infoln

func (*Logs) Infov

func (ls *Logs) Infov(s string, v Vars)

Infov

func (*Logs) IsFormat

func (ls *Logs) IsFormat(f int) bool

IsFormat

func (*Logs) IsFormatName

func (ls *Logs) IsFormatName(f string) bool

IsFormatName

func (*Logs) IsLevel

func (ls *Logs) IsLevel(l int) bool

IsLevel

func (*Logs) IsLevelName

func (ls *Logs) IsLevelName(l string) bool

IsLevelName

func (*Logs) IsTimeStamp

func (ls *Logs) IsTimeStamp() bool

IsTimeStamp

func (*Logs) IsTimeStampLevel

func (ls *Logs) IsTimeStampLevel(l int) bool

IsTimeStampLevel

func (*Logs) IsTimeStampLevelName

func (ls *Logs) IsTimeStampLevelName(l string) bool

IsTimeStampLevelName

func (*Logs) IsTimeUTC

func (ls *Logs) IsTimeUTC() bool

IsTimeUTC

func (*Logs) Labels

func (ls *Logs) Labels() string

Labels

func (*Logs) LabelsSeparator

func (ls *Logs) LabelsSeparator() string

LabelsSeparator

func (*Logs) LabelsToSlice

func (ls *Logs) LabelsToSlice(l string) []string

LabelsToSlice

func (*Logs) LabelsToString

func (ls *Logs) LabelsToString(l []string) string

LabelsToString

func (*Logs) Level

func (ls *Logs) Level() int

Level

func (*Logs) LevelName

func (ls *Logs) LevelName() string

LevelName

func (*Logs) LevelNames

func (ls *Logs) LevelNames() []string

LevelNames

func (*Logs) Levels

func (ls *Logs) Levels() []int

Levels

func (*Logs) Panic

func (ls *Logs) Panic(e error)

Panic

func (*Logs) Panicf

func (ls *Logs) Panicf(e error, i ...interface{})

Panicf

func (*Logs) Panicln

func (ls *Logs) Panicln(i ...interface{})

Panicln

func (*Logs) Panicv

func (ls *Logs) Panicv(e error, v Vars)

Panicv

func (*Logs) Print

func (ls *Logs) Print(s string)

Print

func (*Logs) Printf

func (ls *Logs) Printf(s string, i ...interface{})

Printf

func (*Logs) Println

func (ls *Logs) Println(i ...interface{})

Println

func (*Logs) Printv

func (ls *Logs) Printv(s string, v Vars)

Printv

func (*Logs) SetEnvironment

func (ls *Logs) SetEnvironment(s string)

SetEnvironment

func (*Logs) SetFormat

func (ls *Logs) SetFormat(f int) error

SetFormat

func (*Logs) SetFormatName

func (ls *Logs) SetFormatName(f string) error

SetFormatName

func (*Logs) SetLabels

func (ls *Logs) SetLabels(l string)

SetLabels

func (*Logs) SetLabelsSeparator

func (ls *Logs) SetLabelsSeparator(l string)

SetLabelsSeparator

func (*Logs) SetLevel

func (ls *Logs) SetLevel(l int) error

SetLevel

func (*Logs) SetLevelName

func (ls *Logs) SetLevelName(l string) error

SetLevelName

func (*Logs) SetTag

func (ls *Logs) SetTag(t string)

SetTag

func (*Logs) SetTimeFormat

func (ls *Logs) SetTimeFormat(f string)

SetTimeFormat

func (*Logs) SetTimeStamp

func (ls *Logs) SetTimeStamp(t bool)

SetTimeStamp

func (*Logs) SetTimeStampLevel

func (ls *Logs) SetTimeStampLevel(l int) error

SetTimeStampLevel

func (*Logs) SetTimeStampLevelName

func (ls *Logs) SetTimeStampLevelName(l string) error

SetTimeStampLevelName

func (*Logs) SetTimeUTC

func (ls *Logs) SetTimeUTC(u bool)

SetTimeUTC

func (*Logs) Tag

func (ls *Logs) Tag() string

Tag

func (*Logs) TimeFormat

func (ls *Logs) TimeFormat() string

TimeFormat

func (*Logs) TimeStampLevel

func (ls *Logs) TimeStampLevel() int

TimeStampLevel

func (*Logs) TimeStampLevelName

func (ls *Logs) TimeStampLevelName() string

TimeStampLevelName

func (*Logs) TimeStampLevelNames

func (ls *Logs) TimeStampLevelNames() []string

TimeStampLevelNames

func (*Logs) TimeStampLevels

func (ls *Logs) TimeStampLevels() []int

TimeStampLevels

func (*Logs) Trace

func (ls *Logs) Trace(s string)

Trace

func (*Logs) Tracef

func (ls *Logs) Tracef(s string, i ...interface{})

Tracef

func (*Logs) Traceln

func (ls *Logs) Traceln(i ...interface{})

Traceln

func (*Logs) Tracev

func (ls *Logs) Tracev(s string, v Vars)

Tracev

func (*Logs) Warn

func (ls *Logs) Warn(s string)

Warn

func (*Logs) Warnf

func (ls *Logs) Warnf(s string, i ...interface{})

Warnf

func (*Logs) Warnln

func (ls *Logs) Warnln(i ...interface{})

Warnln

func (*Logs) Warnv

func (ls *Logs) Warnv(s string, v Vars)

Warnv

type StdOE

type StdOE struct {
	Logger      *log.Logger
	Writer      io.Writer
	IsPrintable bool `json:"is_printable" yaml:"is_printable" xml:"is_printable" toml:"is_printable"`
}

StdOE (Stdout, Stderr)

type Sys

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

Sys

func NewSys

func NewSys(s *SysSettings, f ...*Formatter) (*Sys, error)

NewSys

func (*Sys) Close

func (s *Sys) Close() error

Close

func (*Sys) Debug

func (s *Sys) Debug(m string)

Debug

func (*Sys) Debugf

func (s *Sys) Debugf(m string, i ...interface{})

Debugf

func (*Sys) Debugln

func (s *Sys) Debugln(i ...interface{})

Debugln

func (*Sys) Debugv

func (s *Sys) Debugv(m string, v Vars)

Debugv

func (*Sys) Environment

func (s *Sys) Environment() string

Environment

func (*Sys) Error

func (s *Sys) Error(e error)

Error

func (*Sys) Errorf

func (s *Sys) Errorf(e error, i ...interface{})

Errorf

func (*Sys) Errorln

func (s *Sys) Errorln(i ...interface{})

Errorln

func (*Sys) Errorv

func (s *Sys) Errorv(e error, v Vars)

Errorv

func (*Sys) Fatal

func (s *Sys) Fatal(e error)

Fatal

func (*Sys) Fatalf

func (s *Sys) Fatalf(e error, i ...interface{})

Fatalf

func (*Sys) Fatalln

func (s *Sys) Fatalln(i ...interface{})

Fatalln

func (*Sys) Fatalv

func (s *Sys) Fatalv(e error, v Vars)

Fatalv

func (*Sys) Format

func (s *Sys) Format() int

Format

func (*Sys) FormatName

func (s *Sys) FormatName() string

FormatName

func (*Sys) Info

func (s *Sys) Info(m string)

Info

func (*Sys) Infof

func (s *Sys) Infof(m string, i ...interface{})

Infof

func (*Sys) Infoln

func (s *Sys) Infoln(i ...interface{})

Infoln

func (*Sys) Infov

func (s *Sys) Infov(m string, v Vars)

Infov

func (*Sys) IsLevel

func (s *Sys) IsLevel(l int) bool

IsLevel

func (*Sys) IsLevelName

func (s *Sys) IsLevelName(l string) bool

IsLevelName

func (*Sys) IsTimeStamp

func (s *Sys) IsTimeStamp() bool

IsTimeStamp

func (*Sys) IsTimeStampLevel

func (s *Sys) IsTimeStampLevel(l int) bool

IsTimeStampLevel

func (*Sys) IsTimeStampLevelName

func (s *Sys) IsTimeStampLevelName(l string) bool

IsTimeStampLevelName

func (*Sys) IsTimeUTC

func (s *Sys) IsTimeUTC() bool

IsTimeUTC

func (*Sys) Labels

func (s *Sys) Labels() string

Labels

func (*Sys) LabelsSeparator

func (s *Sys) LabelsSeparator() string

LabelsSeparator

func (*Sys) LabelsToSlice

func (s *Sys) LabelsToSlice(l string) []string

LabelsToSlice

func (*Sys) LabelsToString

func (s *Sys) LabelsToString(l []string) string

LabelsToString

func (*Sys) Level

func (s *Sys) Level() int

Level

func (*Sys) LevelName

func (s *Sys) LevelName() string

LevelName

func (*Sys) LevelNames

func (s *Sys) LevelNames() []string

LevelNames

func (*Sys) Levels

func (s *Sys) Levels() []int

Levels

func (*Sys) Panic

func (s *Sys) Panic(e error)

Panic

func (*Sys) Panicf

func (s *Sys) Panicf(e error, i ...interface{})

Panicf

func (*Sys) Panicln

func (s *Sys) Panicln(i ...interface{})

Panicln

func (*Sys) Panicv

func (s *Sys) Panicv(e error, v Vars)

Panicv

func (*Sys) Print

func (s *Sys) Print(m string)

Print

func (*Sys) Printf

func (s *Sys) Printf(m string, i ...interface{})

Printf

func (*Sys) Println

func (s *Sys) Println(i ...interface{})

Println

func (*Sys) Printv

func (s *Sys) Printv(m string, v Vars)

Printv

func (*Sys) SetEnvironment

func (s *Sys) SetEnvironment(e string)

SetEnvironment

func (*Sys) SetLabels

func (s *Sys) SetLabels(l string)

SetLabels

func (*Sys) SetLabelsSeparator

func (s *Sys) SetLabelsSeparator(spr string)

SetLabelsSeparator

func (*Sys) SetLevel

func (s *Sys) SetLevel(l int) error

SetLevel

func (*Sys) SetLevelName

func (s *Sys) SetLevelName(l string) error

SetLevelName

func (*Sys) SetTag

func (s *Sys) SetTag(t string)

SetTag

func (*Sys) SetTimeFormat

func (s *Sys) SetTimeFormat(f string)

SetTimeFormat

func (*Sys) SetTimeStamp

func (s *Sys) SetTimeStamp(t bool)

SetTimeStamp

func (*Sys) SetTimeStampLevel

func (s *Sys) SetTimeStampLevel(l int) error

SetTimeStampLevel

func (*Sys) SetTimeStampLevelName

func (s *Sys) SetTimeStampLevelName(l string) error

SetTimeStampLevelName

func (*Sys) SetTimeUTC

func (s *Sys) SetTimeUTC(u bool)

SetTimeUTC

func (*Sys) Tag

func (s *Sys) Tag() string

Tag

func (*Sys) TimeFormat

func (s *Sys) TimeFormat() string

TimeFormat

func (*Sys) TimeStampLevel

func (s *Sys) TimeStampLevel() int

TimeStampLevel

func (*Sys) TimeStampLevelName

func (s *Sys) TimeStampLevelName() string

TimeStampLevelName

func (*Sys) TimeStampLevelNames

func (s *Sys) TimeStampLevelNames() []string

TimeStampLevelNames

func (*Sys) TimeStampLevels

func (s *Sys) TimeStampLevels() []int

TimeStampLevels

func (*Sys) Trace

func (s *Sys) Trace(m string)

Trace

func (*Sys) Tracef

func (s *Sys) Tracef(m string, i ...interface{})

Tracef

func (*Sys) Traceln

func (s *Sys) Traceln(i ...interface{})

Traceln

func (*Sys) Tracev

func (s *Sys) Tracev(m string, v Vars)

Tracev

func (*Sys) Warn

func (g *Sys) Warn(s string)

Warn

func (*Sys) Warnf

func (s *Sys) Warnf(m string, i ...interface{})

Warnf

func (*Sys) Warnln

func (s *Sys) Warnln(i ...interface{})

Warnln

func (*Sys) Warnv

func (s *Sys) Warnv(m string, v Vars)

Warnv

type SysSettings

type SysSettings struct {
	Connection *Connection `json:"connection" yaml:"connection" xml:"connection" toml:"connection"`
	Hostname   string      `json:"hostname" yaml:"hostname" xml:"hostname" toml:"hostname"`
	Facility   string      `json:"facility" yaml:"facility" xml:"facility" toml:"facility"`
	AppName    string      `json:"app_name" yaml:"app_name" xml:"app_name" toml:"app_name"`
	Format     string      `json:"format" yaml:"format" xml:"format" toml:"format"`
	Tag        string      `json:"tag" yaml:"tag" xml:"tag" toml:"tag"`
	TCP        *SysTCP     `json:"tcp" yaml:"tcp" xml:"tcp" toml:"tcp"`
	Time       *SysTime    `json:"time" yaml:"time" xml:"time" toml:"time"`
}

SysSettings

type SysTCP

type SysTCP struct {
	TLS *TCPTLS `json:"tls" yaml:"tls" xml:"tls" toml:"tls"`
}

SysTCP

type SysTime

type SysTime struct {
	IsUTC bool `json:"is_utc" yaml:"is_utc" xml:"is_utc" toml:"is_utc"`
	Level int  `json:"stamp_level" yaml:"stamp_level" xml:"stamp_level" toml:"stamp_level"`
}

SysTime

type TCPTLS

type TCPTLS struct {
	//	IsValuesUsed bool          `json:"is_values_used" yaml:"is_values_used" xml:"is_values_used" toml:"is_values_used"`
	//	Values       *TCPTLSValues `json:"values" yaml:"values" xml:"values" toml:"values"`
	Files      *TCPTLSFiles `json:"files" yaml:"files" xml:"files" toml:"files"`
	Passphrase string       `json:"passphrase" yaml:"passphrase" xml:"passphrase" toml:"passphrase"`
	IsInsecure bool         `json:"is_insecure" yaml:"is_insecure" xml:"is_insecure" toml:"is_insecure"`
}

TCPTLS

type TCPTLSFiles

type TCPTLSFiles struct {
	RootCACrt string `json:"root_ca_crt" yaml:"root_ca_crt" xml:"root_ca_crt" toml:"root_ca_crt"`
	ClientCrt string `json:"client_crt" yaml:"client_crt" xml:"client_crt" toml:"client_crt"`
	ClientKey string `json:"client_key" yaml:"client_key" xml:"client_key" toml:"client_key"`
}

TCPTLSFiles

type Text

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

Text

func NewText

func NewText(s *TextSettings, f ...*Formatter) (*Text, error)

NewText

func (*Text) Close

func (t *Text) Close() error

Close

func (*Text) Debug

func (t *Text) Debug(s string)

Debug

func (*Text) Debugf

func (t *Text) Debugf(s string, i ...interface{})

Debugf

func (*Text) Debugln

func (t *Text) Debugln(i ...interface{})

Debugln

func (*Text) Debugv

func (t *Text) Debugv(s string, v Vars)

Debugv

func (*Text) Environment

func (t *Text) Environment() string

Environment

func (*Text) Error

func (t *Text) Error(e error)

Error

func (*Text) Errorf

func (t *Text) Errorf(e error, i ...interface{})

Errorf

func (*Text) Errorln

func (t *Text) Errorln(i ...interface{})

Errorln

func (*Text) Errorv

func (t *Text) Errorv(e error, v Vars)

Errorv

func (*Text) Fatal

func (t *Text) Fatal(e error)

Fatal

func (*Text) Fatalf

func (t *Text) Fatalf(e error, i ...interface{})

Fatalf

func (*Text) Fatalln

func (t *Text) Fatalln(i ...interface{})

Fatalln

func (*Text) Fatalv

func (t *Text) Fatalv(e error, v Vars)

Fatalv

func (*Text) Format

func (t *Text) Format() int

Format

func (*Text) FormatName

func (t *Text) FormatName() string

FormatName

func (*Text) Info

func (t *Text) Info(s string)

Info

func (*Text) Infof

func (t *Text) Infof(s string, i ...interface{})

Infof

func (*Text) Infoln

func (t *Text) Infoln(i ...interface{})

Infoln

func (*Text) Infov

func (t *Text) Infov(s string, v Vars)

Infov

func (*Text) IsLevel

func (t *Text) IsLevel(l int) bool

IsLevel

func (*Text) IsLevelName

func (t *Text) IsLevelName(l string) bool

IsLevelName

func (*Text) IsTimeStamp

func (t *Text) IsTimeStamp() bool

IsTimeStamp

func (*Text) IsTimeStampLevel

func (t *Text) IsTimeStampLevel(l int) bool

IsTimeStampLevel

func (*Text) IsTimeStampLevelName

func (t *Text) IsTimeStampLevelName(l string) bool

IsTimeStampLevelName

func (*Text) IsTimeUTC

func (t *Text) IsTimeUTC() bool

IsTimeUTC

func (*Text) Labels

func (t *Text) Labels() string

Labels

func (*Text) LabelsSeparator

func (t *Text) LabelsSeparator() string

LabelsSeparator

func (*Text) LabelsToSlice

func (t *Text) LabelsToSlice(l string) []string

LabelsToSlice

func (*Text) LabelsToString

func (t *Text) LabelsToString(l []string) string

LabelsToString

func (*Text) Level

func (t *Text) Level() int

Level

func (*Text) LevelName

func (t *Text) LevelName() string

LevelName

func (*Text) LevelNames

func (t *Text) LevelNames() []string

LevelNames

func (*Text) Levels

func (t *Text) Levels() []int

Levels

func (*Text) Panic

func (t *Text) Panic(e error)

Panic

func (*Text) Panicf

func (t *Text) Panicf(e error, i ...interface{})

Panicf

func (*Text) Panicln

func (t *Text) Panicln(i ...interface{})

Panicln

func (*Text) Panicv

func (t *Text) Panicv(e error, v Vars)

Panicv

func (*Text) Print

func (t *Text) Print(s string)

Print

func (*Text) Printf

func (t *Text) Printf(s string, i ...interface{})

Printf

func (*Text) Println

func (t *Text) Println(i ...interface{})

Println

func (*Text) Printv

func (t *Text) Printv(s string, v Vars)

Printv

func (*Text) SetEnvironment

func (t *Text) SetEnvironment(e string)

SetEnvironment

func (*Text) SetLabels

func (t *Text) SetLabels(l string)

SetLabels

func (*Text) SetLabelsSeparator

func (t *Text) SetLabelsSeparator(s string)

SetLabelsSeparator

func (*Text) SetLevel

func (t *Text) SetLevel(l int) error

SetLevel

func (*Text) SetLevelName

func (t *Text) SetLevelName(l string) error

SetLevelName

func (*Text) SetTag

func (t *Text) SetTag(s string)

SetTag

func (*Text) SetTimeFormat

func (t *Text) SetTimeFormat(f string)

SetTimeFormat

func (*Text) SetTimeStamp

func (t *Text) SetTimeStamp(s bool)

SetTimeStamp

func (*Text) SetTimeStampLevel

func (t *Text) SetTimeStampLevel(l int) error

SetTimeStampLevel

func (*Text) SetTimeStampLevelName

func (t *Text) SetTimeStampLevelName(l string) error

SetTimeStampLevelName

func (*Text) SetTimeUTC

func (t *Text) SetTimeUTC(u bool)

SetTimeUTC

func (*Text) Tag

func (t *Text) Tag() string

Tag

func (*Text) TimeFormat

func (t *Text) TimeFormat() string

TimeFormat

func (*Text) TimeStampLevel

func (t *Text) TimeStampLevel() int

TimeStampLevel

func (*Text) TimeStampLevelName

func (t *Text) TimeStampLevelName() string

TimeStampLevelName

func (*Text) TimeStampLevelNames

func (t *Text) TimeStampLevelNames() []string

TimeStampLevelNames

func (*Text) TimeStampLevels

func (t *Text) TimeStampLevels() []int

TimeStampLevels

func (*Text) Trace

func (t *Text) Trace(s string)

Trace

func (*Text) Tracef

func (t *Text) Tracef(s string, i ...interface{})

Tracef

func (*Text) Traceln

func (t *Text) Traceln(i ...interface{})

Traceln

func (*Text) Tracev

func (t *Text) Tracev(s string, v Vars)

Tracev

func (*Text) Warn

func (t *Text) Warn(s string)

Warn

func (*Text) Warnf

func (t *Text) Warnf(s string, i ...interface{})

Warnf

func (*Text) Warnln

func (t *Text) Warnln(i ...interface{})

Warnln

func (*Text) Warnv

func (t *Text) Warnv(s string, v Vars)

Warnv

type TextSettings

type TextSettings struct {
	IsColorize bool `json:"is_colorize" yaml:"is_colorize" xml:"is_colorize" toml:"is_colorize"`
}

TextSettings

type Time

type Time struct {
	IsUTC          bool   `json:"is_utc" yaml:"is_utc" xml:"is_utc" toml:"is_utc"`
	IsStamp        bool   `json:"is_stamp" yaml:"is_stamp" xml:"is_stamp" toml:"is_stamp"`
	StampLevel     int    `json:"stamp_level" yaml:"stamp_level" xml:"stamp_level" toml:"stamp_level"`
	StampLevelName string `json:"stamp_level_name" yaml:"stamp_level_name" xml:"stamp_level_name" toml:"stamp_level_name"`
	Format         string `json:"format" yaml:"format" xml:"format" toml:"format"`
}

Time

type Vars

type Vars map[string]interface{}

Vars

Jump to

Keyboard shortcuts

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