Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetJSONFormatter ¶ added in v0.28.4
SetJSONFormatter set the JSON formatter for given logger.
func SetLogcatFormatter ¶ added in v0.14.5
SetLogcatFormatter set the logcat formatter for given logger.
func SetSyslogFormatter ¶ added in v0.28.7
SetSyslogFormatter set the text formatter for given logger.
func SetTextFormatter ¶
SetTextFormatter set the text formatter for given logger.
Types ¶
type ContextHook ¶
type ContextHook struct {
// contains filtered or unexported fields
}
ContextHook is a custom hook for add the source information for the entry
func NewContextHook ¶
func NewContextHook() *ContextHook
NewContextHook instantiate a new context hook
func (ContextHook) Fire ¶
func (hook ContextHook) Fire(entry *logrus.Entry) error
Fire extend with the source information the entry.Data
func (ContextHook) Levels ¶
func (hook ContextHook) Levels() []logrus.Level
Levels set the supported levels for this hook
type ExecutionContext ¶ added in v0.28.4
type ExecutionContext string
const ( ExecutionContextKey = "executionContext" HTTPSource ExecutionContext = "HTTP" GRPCSource ExecutionContext = "GRPC" SystemSource ExecutionContext = "SYSTEM" )
type LogcatFormatter ¶ added in v0.14.5
type LogcatFormatter struct {
// contains filtered or unexported fields
}
LogcatFormatter formats logs into text what is fit for logcat
func NewLogcatFormatter ¶ added in v0.14.5
func NewLogcatFormatter() *LogcatFormatter
NewLogcatFormatter create new LogcatFormatter instance
type SyslogFormatter ¶ added in v0.28.7
type SyslogFormatter struct {
// contains filtered or unexported fields
}
SyslogFormatter formats logs into text
func NewSyslogFormatter ¶ added in v0.28.7
func NewSyslogFormatter() *SyslogFormatter
NewSyslogFormatter create new MySyslogFormatter instance
type TextFormatter ¶
type TextFormatter struct {
// contains filtered or unexported fields
}
TextFormatter formats logs into text with included source code's path
func NewTextFormatter ¶
func NewTextFormatter() *TextFormatter
NewTextFormatter create new MyTextFormatter instance