Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LogFormatPlainText means to write logs as a plain text. LogFormatPlainText = LogFormat(iota) // LogFormatPlainTextCompact means to write logs as a compact plain text. // // Falls back to LogFormatPlainText if the compact format is not supported. LogFormatPlainTextCompact // LogFormatJSON means to write logs as JSON objects. LogFormatJSON )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LoggerReportCaller bool TracerReportCaller bool TimestampFormat string VerboseCaller bool Tracer xcontext.Tracer Format LogFormat }
Config is a configuration state resulted from Option-s.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is a modifier of what context to construct.
type OptionLoggerReportCaller ¶
type OptionLoggerReportCaller bool
OptionLoggerReportCaller defines if it is required to determine source-code file name and line and report it to logs. It negatively affects performance of logging.
type OptionTimestampFormat ¶
type OptionTimestampFormat string
OptionTimestampFormat defines the format of timestamps while logging.
type OptionTracer ¶
OptionTracer defines if a tracer should be added to the context.
type OptionTracerReportCaller ¶
type OptionTracerReportCaller bool
OptionTracerReportCaller the same as OptionLoggerReportCaller, but for a tracer.
Click to show internal directories.
Click to hide internal directories.