Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogSinkFileConfig = &logSinkFileConfig{}
Functions ¶
func UseEnvConfig ¶
func UseEnvConfig()
func UseFileConfig ¶
func UseFileConfig()
Types ¶
type IOLogSink ¶
type IOLogSink struct {
// contains filtered or unexported fields
}
io.Writer based log sink. Write a log line per a record on the storage related with io.Writer
func NewIOLogSink ¶
Return a new IOLogSink object. format string can have following variables.
- $TIMESTAMP : timestamp of a log record
- $LOGLEVEL : log level
- $SOURCE_FILE : source file name where a record is produced.
- $SOURCE_LINE : a line no of source file where a record is produced.
- $GOROUTINE : Goroutine ID
- $SESSSION_ID : Session ID
- $REQUEST_ID : Request ID
- $USER_ID : User ID
- $TEXT : text message produced by app.
and if it is "", "[$GOROUTINE:$USER_ID:$SESSION_ID:$REQUEST_ID] $TEXT ($SOURCE_FILE#$SOURCE_LINE)" is used.
func NewIOLogSinkFromConfig ¶
func NewIOLogSinkFromConfig(cfg *logSinkFileConfig) *IOLogSink
func (IOLogSink) AsyncSupport ¶
Click to show internal directories.
Click to hide internal directories.