Documentation
¶
Overview ¶
//http://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html#8-colors
//Global Format \u001b[+COLOR+m Non BRIGHT \u001b[+COLOR+;1m BRIGHT // FORMATTING \u001b[1m BOLD \u001b[4m Underline \u001b[7m Reversed // Formats Foreground 8 bit \u001b[30m 16 bit \u001b[30;1m 256 bit \u001b[38;5;${ID}m //Colors CLR_BLK = "\x1b[30m" // black CLR_BLKBRIGHT = "\x1b[30;1m" // black bright CLR_RED = "\x1b[31m" // red CLR_REDBRT = "\x1b[31;1m" // red CLR_GRN = "\x1b[32m" // green CLR_YLLW = "\x1b[33m" // yellow CLR_BLU = "\x1b[34;1m" // blue CLR_MAG = "\x1b[35;1m" // magenta CLR_CYAN = "\x1b[36;1m" // cyan CLR_WHT = "\x1b[37;1m" // white CLR_RESET = "\x1b[0m" // reset to default //ASCII 256 CLR_DEFAULT = "\x1b[38;5;10m" CLR_ERR = "\x1b[38;5;196m" //red CLR_WARN = "\x1b[38;5;11m" //yellow CLR_INFO = "\x1b[38;5;174m" // light red/brown //Formats Background Color bright versions of the background colors do not change the background, but rather make the foreground text brighter 8 bit \u001b[40m 16 bit \u001b[40;1m 256 bit \u001b[48;5; CLRBG_BLK = "\x1b[40m" CLRBG_BLKBRIGHTb = "\x1b[40;1m"
Index ¶
- Constants
- Variables
- func Black(format string, a ...interface{}) string
- func Blue(format string, a ...interface{}) string
- func Bool2Str(val bool) string
- func BrightBlack(format string, a ...interface{}) string
- func ColorBrightFmt(color ColorAttr) string
- func ColorFmt(color ColorAttr) string
- func Cyan(format string, a ...interface{}) string
- func Debug(format string, args ...interface{})
- func DebugL2(format string, args ...interface{})
- func DebugL3ln(args ...interface{})
- func DebugX2(format string, args ...interface{})
- func DebugX2ln(args ...interface{})
- func Debugln(args ...interface{})
- func DisableTimestamp()
- func EnableTimestamp()
- func Error(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Exit(code int)
- func Flags() int
- func Green(format string, a ...interface{}) string
- func Info(format string, args ...interface{})
- func Infoln(args ...interface{})
- func IsDebug() bool
- func IsDebugL3() bool
- func IsDebugX2() bool
- func IsError() bool
- func IsFatal() bool
- func IsFatalNE() bool
- func IsInfo() bool
- func IsNone() bool
- func IsWarn() bool
- func Level() enum.LogLevel
- func Logf(lvl enum.LogLevel, format string, args ...interface{})
- func Logln(lvl enum.LogLevel, args ...interface{})
- func Magenta(format string, a ...interface{}) string
- func Modify(opts ...LogOption)
- func Print(args ...interface{})
- func PrintGoSyntaxOfValue(arg interface{})
- func PrintStructWithFieldNames(arg interface{})
- func PrintTypeOfValue(arg interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func Red(format string, a ...interface{}) string
- func SetFlags(flg enum.Flags)
- func SetFormatter(formatter Layout)
- func SetLevel(level enum.LogLevel)
- func ShowAppenders() []string
- func ShowConfig()
- func White(format string, a ...interface{}) string
- func Yellow(format string, a ...interface{}) string
- type Appender
- type Auth
- type ByNumericalFilename
- type ByNumericalFilenameRev
- type Client
- type Clr
- type ColorAttr
- type Column
- type ConsoleAppender
- type CronTriggerPolicy
- type FailoverAppender
- type Fields
- type FileAppender
- type FileStrategy
- type HTTPAppender
- type JSONLayout
- type Layout
- type LogMsg
- func (entry *LogMsg) Error(args ...interface{})
- func (entry *LogMsg) Fatal(args ...interface{})
- func (entry *LogMsg) Info(args ...interface{})
- func (entry *LogMsg) LogEnt(level enum.LogLevel, format, caller string, rtn bool, args ...interface{})
- func (entry *LogMsg) WithFields(fields []Fields) *LogMsg
- type LogOption
- func Appenders(a ...Appender) LogOption
- func CallDepth(i int) LogOption
- func ColorsOn() LogOption
- func DebugColor(clr ColorAttr) LogOption
- func DebugLvl2Color(clr ColorAttr) LogOption
- func DebugLvl3Color(clr ColorAttr) LogOption
- func ErrColor(clr ColorAttr) LogOption
- func Formatter(f Layout) LogOption
- func HiColorsOn() LogOption
- func InfoColor(clr ColorAttr) LogOption
- func LogLevel(l enum.LogLevel) LogOption
- func LogOut(i io.Writer) LogOption
- func SetFlgs(i enum.Flags) LogOption
- func WarnColor(clr ColorAttr) LogOption
- type MailAppender
- type OutAppender
- type ParamMap
- type PrinterTable
- type ResyncOnce
- type RollingFileAppender
- func NewRollingFileAppender(filter, fileName, name string, bufferSize int) (*RollingFileAppender, error)
- func NewRollingFileAppenderWithTrigger(filter, fileName, name string, bufferSize int, trigger TriggerPolicy) (*RollingFileAppender, error)
- func NewRollingFileAppenderWithTriggerAndStrategy(filter, fileName, name string, bufferSize int, trigger TriggerPolicy, ...) (*RollingFileAppender, error)
- type Row
- type SizeTriggerPolicy
- type SocketAppender
- type StdLogger
- func (l *StdLogger) Caller() string
- func (l *StdLogger) Flags() int
- func (l *StdLogger) Level() enum.LogLevel
- func (l *StdLogger) Logf(lvl enum.LogLevel, format string, args ...interface{})
- func (l *StdLogger) Logln(lvl enum.LogLevel, args ...interface{})
- func (l *StdLogger) Print(args ...interface{})
- func (l *StdLogger) PrintGoSyntaxOfValue(arg interface{})
- func (l *StdLogger) PrintStructWithFieldNames(arg interface{})
- func (l *StdLogger) PrintTypeOfValue(arg interface{})
- func (l *StdLogger) Printf(format string, args ...interface{})
- func (l *StdLogger) Println(args ...interface{})
- func (l *StdLogger) SetFlags(flg enum.Flags)
- func (l *StdLogger) SetFormatter(formatter Layout)
- func (l *StdLogger) SetLevel(level enum.LogLevel)
- func (l *StdLogger) ShowOptions()
- func (l *StdLogger) WithFields(fields []Fields) *LogMsg
- type Strategy
- type SyslogAppender
- type Table
- type TableOption
- type TextLayout
- type TimeTriggerPolicy
- type TriggerPolicy
- type XMLLayout
- type XMLParamMap
Constants ¶
const ( ParamMsg = "msg" ParamLevel = "level" ParamTime = "time" )
Default key names for the default fields
const ( XMLParamMsg = "msg" XMLParamLevel = "level" XMLParamTime = "time" )
Default key names for the default fields
const DefaultTimestampFormat = time.RFC3339
Variables ¶
var ( // if NOT a terminal then turn off COLOR DumbTerm = os.Getenv("TERM") == "dumb" Term = isatty.IsTerminal(os.Stdout.Fd()) CygwinTerm = isatty.IsCygwinTerminal(os.Stdout.Fd()) NotTerminal = os.Getenv("TERM") == "dumb" || (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) )
Functions ¶
func BrightBlack ¶ added in v0.0.14
func ColorBrightFmt ¶
func DisableTimestamp ¶
func DisableTimestamp()
func EnableTimestamp ¶
func EnableTimestamp()
func PrintGoSyntaxOfValue ¶ added in v0.0.15
func PrintGoSyntaxOfValue(arg interface{})
func PrintStructWithFieldNames ¶ added in v0.0.15
func PrintStructWithFieldNames(arg interface{})
func PrintTypeOfValue ¶ added in v0.0.15
func PrintTypeOfValue(arg interface{})
func SetFormatter ¶
func SetFormatter(formatter Layout)
func ShowAppenders ¶ added in v0.0.13
func ShowAppenders() []string
func ShowConfig ¶
func ShowConfig()
Types ¶
type Appender ¶
type Appender interface { Name() string //package or name to find in message, in Java this was a package Applicable(filter string) bool Process(msg []byte) DisableColor() bool }
Appender
type ByNumericalFilename ¶ added in v0.0.12
func (ByNumericalFilename) Len ¶ added in v0.0.12
func (nf ByNumericalFilename) Len() int
func (ByNumericalFilename) Less ¶ added in v0.0.12
func (nf ByNumericalFilename) Less(i, j int) bool
func (ByNumericalFilename) Swap ¶ added in v0.0.12
func (nf ByNumericalFilename) Swap(i, j int)
type ByNumericalFilenameRev ¶ added in v0.0.12
func (ByNumericalFilenameRev) Len ¶ added in v0.0.12
func (nf ByNumericalFilenameRev) Len() int
func (ByNumericalFilenameRev) Less ¶ added in v0.0.12
func (nf ByNumericalFilenameRev) Less(i, j int) bool
func (ByNumericalFilenameRev) Swap ¶ added in v0.0.12
func (nf ByNumericalFilenameRev) Swap(i, j int)
type Client ¶ added in v0.0.5
type Client struct { DialTimeout time.Duration DialKeepAliveTimeout time.Duration MaxIdleConnections int IdleConnTimeout time.Duration TlsHandshakeTimeout time.Duration ResponseHeaderTimeout time.Duration //ExpectContinueTimeout time.Duration // will disable HTTP2 if used HttpClientRequestTimeout time.Duration // contains filtered or unexported fields }
type Clr ¶
type Clr struct {
// contains filtered or unexported fields
}
func CachedColor ¶
func (*Clr) DisableColor ¶
func (c *Clr) DisableColor()
type ColorAttr ¶
type ColorAttr int
const ( Reset ColorAttr = iota BOLD FAINT // does nothing ITALIC UNDERLINE BlinkSlow // does nothing BlinkRapid // does nothing Reversed NonDisplayed )
Base Color Attributes
const ( FgBlack ColorAttr = iota + 30 FgRed FgGreen FgYellow FgBlue FgMagenta FgCyan FgWhite CLRRESET = "\u001b[0m" // reset to default ClearTerminalSequence = "\033[2J" )
FG Text Colors
FG Hi-Intensity Text
BG text colors
const ( BgHiBlack ColorAttr = iota + 100 BgHiRed BgHiGreen BgHiYellow BgHiBlue BgHiMagenta BgHiCyan BgHiWhite )
Background Hi-Intensity text colors
func (ColorAttr) ValAsString ¶
type ConsoleAppender ¶
type ConsoleAppender struct {
*OutAppender
}
******************* CONSOLE APPENDER ********************
func NewConsoleAppender ¶
func NewConsoleAppender(filter string) *ConsoleAppender
func (*ConsoleAppender) Applicable ¶
func (c *ConsoleAppender) Applicable(filter string) bool
func (*ConsoleAppender) DisableColor ¶
func (c *ConsoleAppender) DisableColor() bool
func (*ConsoleAppender) Name ¶
func (c *ConsoleAppender) Name() string
func (*ConsoleAppender) Process ¶
func (c *ConsoleAppender) Process(msg []byte)
type CronTriggerPolicy ¶
type CronTriggerPolicy struct {
// contains filtered or unexported fields
}
tests using cron
func NewCronTriggerPolicy ¶
func NewCronTriggerPolicy(schedule string) *CronTriggerPolicy
type FailoverAppender ¶
type FailoverAppender struct { RetryIntervalSeconds int // default 60 sec // contains filtered or unexported fields }
******************* FAIL OVER APPENDER ********************
func NewFailoverAppender ¶
func NewFailoverAppender(primary Appender, failovers []Appender) *FailoverAppender
func (*FailoverAppender) Applicable ¶
func (f *FailoverAppender) Applicable(msg string) bool
func (*FailoverAppender) DisableColor ¶
func (f *FailoverAppender) DisableColor() bool
func (*FailoverAppender) Name ¶
func (f *FailoverAppender) Name() string
func (*FailoverAppender) Process ¶
func (f *FailoverAppender) Process(msg []byte)
type Fields ¶
type Fields map[string]interface{}
Fields type, used to pass to `WithFields`.
func (Fields) MarshalXML ¶ added in v0.0.9
StringMap marshals into XML.
type FileAppender ¶
type FileAppender struct { *OutAppender FilePerm os.FileMode //default 0777 UserID int GroupID int // contains filtered or unexported fields }
func NewFileAppender ¶
func NewFileAppender(filter, fileName, name string, bufferSize int) (*FileAppender, error)
func (*FileAppender) Applicable ¶
func (f *FileAppender) Applicable(msg string) bool
func (*FileAppender) DisableColor ¶
func (f *FileAppender) DisableColor() bool
func (*FileAppender) Name ¶
func (f *FileAppender) Name() string
func (*FileAppender) Process ¶
func (f *FileAppender) Process(msg []byte)
type FileStrategy ¶ added in v0.0.14
type FileStrategy struct {
// contains filtered or unexported fields
}
func DefaultFileStrategy ¶ added in v0.0.14
func DefaultFileStrategy() *FileStrategy
func NewDefaultFileStrategy ¶ added in v0.0.14
func NewDefaultFileStrategy(maxKeep, compressionLevel int) *FileStrategy
func (*FileStrategy) CompressionLevel ¶ added in v0.0.14
func (s *FileStrategy) CompressionLevel() int
func (*FileStrategy) Max ¶ added in v0.0.14
func (s *FileStrategy) Max() int
type HTTPAppender ¶ added in v0.0.5
type HTTPAppender struct { *OutAppender // contains filtered or unexported fields }
func NewHTTPAppender ¶ added in v0.0.5
func NewHTTPAppender(filter, url, username, password string) (*HTTPAppender, error)
func (*HTTPAppender) Applicable ¶ added in v0.0.5
func (f *HTTPAppender) Applicable(msg string) bool
func (*HTTPAppender) DisableColor ¶ added in v0.0.5
func (f *HTTPAppender) DisableColor() bool
func (*HTTPAppender) Name ¶ added in v0.0.5
func (f *HTTPAppender) Name() string
func (*HTTPAppender) Process ¶ added in v0.0.5
func (f *HTTPAppender) Process(msg []byte)
type JSONLayout ¶
type JSONLayout struct { // TimestampFormat sets the format used for marshaling timestamps. TimestampFormat string // DisableTimestamp allows disabling automatic timestamps in output DisableTimestamp bool ParamMap ParamMap }
func (*JSONLayout) Colors ¶
func (f *JSONLayout) Colors(enable bool)
func (*JSONLayout) Description ¶
func (f *JSONLayout) Description() string
func (*JSONLayout) DisableTimeStamp ¶
func (f *JSONLayout) DisableTimeStamp()
func (*JSONLayout) EnableTimeStamp ¶
func (f *JSONLayout) EnableTimeStamp()
type LogMsg ¶
type LogMsg struct { Logger *StdLogger //None, Fatal, Error, Warn, Info, Debug Level enum.LogLevel //Message passed into logger Message string //Fields passed to template i.e. for JSON output Fields []Fields // Time entry was created Time time.Time // When formatter is called in entry.log(), an Buffer may be set to entry Buffer *bytes.Buffer // contains filtered or unexported fields }
Create a pool for reuse in order to speed up process of logging
func WithFields ¶
WithFields creates an entry from the standard logger and adds multiple fields to it. This is simply a helper for `WithField`, invoking it once for each field.
Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.
func (*LogMsg) WithFields ¶
Add a map of fields to the Entry.
type LogOption ¶
type LogOption func(h *StdLogger)
func DebugColor ¶
func DebugLvl2Color ¶ added in v0.0.14
func DebugLvl3Color ¶ added in v0.0.14
func HiColorsOn ¶
func HiColorsOn() LogOption
type MailAppender ¶ added in v0.0.4
type MailAppender struct { *OutAppender // contains filtered or unexported fields }
func NewMailAppender ¶ added in v0.0.4
func NewMailAppender(filter, smtpServer, smtpUsername, smtpPass, smtpFrom, smtpTo, smtpSubject string, smtpPort int) (*MailAppender, error)
func (*MailAppender) Applicable ¶ added in v0.0.4
func (f *MailAppender) Applicable(msg string) bool
func (*MailAppender) DisableColor ¶ added in v0.0.4
func (f *MailAppender) DisableColor() bool
func (*MailAppender) Name ¶ added in v0.0.4
func (f *MailAppender) Name() string
func (*MailAppender) Process ¶ added in v0.0.4
func (f *MailAppender) Process(msg []byte)
type OutAppender ¶
type ParamMap ¶
type ParamMap map[key]string
FieldMap allows customization of the key names for default fields.
type PrinterTable ¶
type PrinterTable struct { Table // contains filtered or unexported fields }
func NewTable ¶
func NewTable(header []string, rows [][]string, opts ...TableOption) (*PrinterTable, error)
func (*PrinterTable) AdjustData ¶
func (t *PrinterTable) AdjustData()
func (*PrinterTable) Print ¶
func (t *PrinterTable) Print()
Loop over each column and find largest width to make that column for all in it
func (*PrinterTable) Sizes ¶
func (t *PrinterTable) Sizes()
type ResyncOnce ¶
type ResyncOnce struct {
// contains filtered or unexported fields
}
func (*ResyncOnce) Do ¶
func (o *ResyncOnce) Do(f func())
func (*ResyncOnce) Reset ¶
func (o *ResyncOnce) Reset()
type RollingFileAppender ¶
type RollingFileAppender struct { *FileAppender // contains filtered or unexported fields }
func NewRollingFileAppender ¶
func NewRollingFileAppender(filter, fileName, name string, bufferSize int) (*RollingFileAppender, error)
NewRollingFileAppender filter source code path to apply to this appender i.e. github.com/colt3k/nglog/ fileName path and name of log file name name of this appender bufferSize 0 (use default: 8192)
func NewRollingFileAppenderWithTrigger ¶ added in v0.0.14
func NewRollingFileAppenderWithTrigger(filter, fileName, name string, bufferSize int, trigger TriggerPolicy) (*RollingFileAppender, error)
NewRollingFileAppenderWithTrigger
filter source code path to apply to this appender i.e. github.com/colt3k/nglog/ fileName path and name of log file name name of this appender bufferSize 0 (use default: 8192) trigger *TriggerPolicy that fires off a rotation strategy *Strategy to apply to rotated file
func NewRollingFileAppenderWithTriggerAndStrategy ¶ added in v0.0.14
func NewRollingFileAppenderWithTriggerAndStrategy(filter, fileName, name string, bufferSize int, trigger TriggerPolicy, strategy Strategy) (*RollingFileAppender, error)
NewRollingFileAppenderWithTriggerAndStrategy filter source code path to apply to this appender i.e. github.com/colt3k/nglog/ fileName path and name of log file name name of this appender bufferSize 0 (use default: 8192) trigger *TriggerPolicy that fires off a rotation strategy *Strategy to apply to rotated file
func (*RollingFileAppender) Applicable ¶
func (r *RollingFileAppender) Applicable(filter string) bool
func (*RollingFileAppender) DisableColor ¶
func (r *RollingFileAppender) DisableColor() bool
func (*RollingFileAppender) Name ¶
func (r *RollingFileAppender) Name() string
func (*RollingFileAppender) Process ¶
func (r *RollingFileAppender) Process(msg []byte)
TODO add logging for rolling
type SizeTriggerPolicy ¶
type SizeTriggerPolicy struct {
// contains filtered or unexported fields
}
checks while running or on start
func DefaultSizeTriggerPolicy ¶ added in v0.0.14
func DefaultSizeTriggerPolicy() *SizeTriggerPolicy
DefaultSizeTriggerPolicy sets maxSizeMB to default of 4
func NewSizeTriggerPolicy ¶
func NewSizeTriggerPolicy(maxSizeMB float64) *SizeTriggerPolicy
type SocketAppender ¶ added in v0.0.6
type SocketAppender struct { *OutAppender // contains filtered or unexported fields }
func NewSocketAppender ¶ added in v0.0.6
func NewSocketAppender(filter, server, port string) (*SocketAppender, error)
func (*SocketAppender) Applicable ¶ added in v0.0.6
func (f *SocketAppender) Applicable(msg string) bool
func (*SocketAppender) DisableColor ¶ added in v0.0.6
func (f *SocketAppender) DisableColor() bool
func (*SocketAppender) Name ¶ added in v0.0.6
func (f *SocketAppender) Name() string
func (*SocketAppender) Process ¶ added in v0.0.6
func (f *SocketAppender) Process(msg []byte)
type StdLogger ¶
type StdLogger struct { Formatter Layout Out io.Writer ColorDEFAULT string ColorERR string ColorWARN string ColorINFO string ColorDEBUG string ColorDEBUGL2 string ColorDEBUGL3 string // Used to sync writing to the log. Locking is enabled by Default MU util.MutexWrap Now time.Time // contains filtered or unexported fields }
func (*StdLogger) PrintGoSyntaxOfValue ¶ added in v0.0.15
func (l *StdLogger) PrintGoSyntaxOfValue(arg interface{})
func (*StdLogger) PrintStructWithFieldNames ¶ added in v0.0.15
func (l *StdLogger) PrintStructWithFieldNames(arg interface{})
func (*StdLogger) PrintTypeOfValue ¶ added in v0.0.15
func (l *StdLogger) PrintTypeOfValue(arg interface{})
func (*StdLogger) SetFlags ¶
* SetFlags Ldate = 1 << iota // the date in the local time zone: 2009/01/23 Ltime // the time in the local time zone: 01:23:23 Lmicroseconds // microsecond resolution: 01:23:23.123123. assumes Ltime. Llongfile // full file name and line number: /a/b/c/d.go:23 Lshortfile // final file name element and line number: d.go:23. overrides Llongfile LUTC // if Ldate or Ltime is set, use UTC rather than the local time zone LstdFlags = Ldate | Ltime // initial values for the standard logger
func (*StdLogger) SetFormatter ¶
func (*StdLogger) ShowOptions ¶
func (l *StdLogger) ShowOptions()
func (*StdLogger) WithFields ¶
Adds a struct of fields to the log entry. All it does is call `WithField` for each `Field`.
type SyslogAppender ¶ added in v0.0.7
type SyslogAppender struct {
*OutAppender
}
******************* Syslog APPENDER ********************
func NewSyslogAppender ¶ added in v0.0.7
func NewSyslogAppender(filter, programName string) (*SyslogAppender, error)
func (*SyslogAppender) Applicable ¶ added in v0.0.7
func (c *SyslogAppender) Applicable(filter string) bool
func (*SyslogAppender) DisableColor ¶ added in v0.0.7
func (c *SyslogAppender) DisableColor() bool
func (*SyslogAppender) Name ¶ added in v0.0.7
func (c *SyslogAppender) Name() string
func (*SyslogAppender) Process ¶ added in v0.0.7
func (c *SyslogAppender) Process(msg []byte)
type TableOption ¶
type TableOption func(h *PrinterTable)
func TableBorder ¶
func TableBorder(border bool) TableOption
func TableHorizontal ¶
func TableHorizontal(horizontal bool) TableOption
func TableName ¶
func TableName(tblName string) TableOption
type TextLayout ¶
type TextLayout struct { //Force Color ForceColor bool // Force disabling colors. DisableColors bool // TimestampFormat to use for display when a full timestamp is printed TimestampFormat string // The fields are sorted by default for a consistent output. For applications // that log extremely frequently and don't use the JSON formatter this may not // be desired. DisableSorting bool QuoteEmptyVal bool DisableTimestamp bool sync.Once // contains filtered or unexported fields }
func (*TextLayout) Colors ¶
func (f *TextLayout) Colors(enable bool)
func (*TextLayout) Description ¶
func (f *TextLayout) Description() string
func (*TextLayout) DisableTimeStamp ¶
func (f *TextLayout) DisableTimeStamp()
func (*TextLayout) EnableTimeStamp ¶
func (f *TextLayout) EnableTimeStamp()
type TimeTriggerPolicy ¶
type TimeTriggerPolicy struct {
// contains filtered or unexported fields
}
tests on interval of hours with a possible max random delay of X
func NewTimeTriggerPolicy ¶
func NewTimeTriggerPolicy(interval, maxRandomDelay int) *TimeTriggerPolicy
type XMLLayout ¶ added in v0.0.9
type XMLLayout struct { // TimestampFormat sets the format used for marshaling timestamps. TimestampFormat string // DisableTimestamp allows disabling automatic timestamps in output DisableTimestamp bool ParamMap XMLParamMap }
func (*XMLLayout) Description ¶ added in v0.0.9
func (*XMLLayout) DisableTimeStamp ¶ added in v0.0.9
func (f *XMLLayout) DisableTimeStamp()
func (*XMLLayout) EnableTimeStamp ¶ added in v0.0.9
func (f *XMLLayout) EnableTimeStamp()
type XMLParamMap ¶ added in v0.0.9
type XMLParamMap map[keyXML]string
FieldMap allows customization of the key names for default fields.
func (XMLParamMap) Find ¶ added in v0.0.9
func (f XMLParamMap) Find(key keyXML) string
Source Files
¶
- appender.go
- appender_console.go
- appender_failover.go
- appender_file.go
- appender_http.go
- appender_mail.go
- appender_policies.go
- appender_rollingfile.go
- appender_socket.go
- appender_strategies.go
- appender_syslog.go
- color.go
- jsonlayout.go
- logger.go
- logoption.go
- msg.go
- once.go
- table.go
- textlayout.go
- xmllayout.go