Documentation ¶
Index ¶
- type DefaultLogger
- type LogAdaptor
- func (la LogAdaptor) Debug(f func() string)
- func (la LogAdaptor) Errorf(format string, values ...interface{})
- func (la LogAdaptor) Info(f func() string)
- func (la LogAdaptor) Infof(format string, values ...interface{})
- func (la LogAdaptor) Trace(f func() string)
- func (la LogAdaptor) TraceHere()
- func (la LogAdaptor) Warnf(format string, values ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
DefaultLogger has Go's built-in logger embedded in it. It adds level logging. To set the logging level, one should use the LoggingLevel property. For example to set it to debug level:
config.SetProperty(property.LoggingLevel.Name(), logger.DebugLevel)
If loggerConfig.SetLogger() method is called, the LoggingLevel property will not be used.
func NewWithLevel ¶
func NewWithLevel(loggingLevel logger.Level) (*DefaultLogger, error)
type LogAdaptor ¶ added in v1.2.0
LogAdaptor is used to convert logger implementations of public interface logger.LogAdaptor to internal logging interface LogAdaptor
func (LogAdaptor) Debug ¶ added in v1.2.0
func (la LogAdaptor) Debug(f func() string)
Debug runs the given function to generate the logger string, if logger level is debug or finer.
func (LogAdaptor) Errorf ¶ added in v1.2.0
func (la LogAdaptor) Errorf(format string, values ...interface{})
Errorf formats the given string with the given values, if logger level is error or finer.
func (LogAdaptor) Info ¶ added in v1.2.0
func (la LogAdaptor) Info(f func() string)
Info runs the given function to generate the logger string, if logger level is trace or finer.
func (LogAdaptor) Infof ¶ added in v1.2.0
func (la LogAdaptor) Infof(format string, values ...interface{})
Infof formats the given string with the given values, if logger level is info or finer.
func (LogAdaptor) Trace ¶ added in v1.2.0
func (la LogAdaptor) Trace(f func() string)
Trace runs the given function to generate the logger string, if logger level is trace or finer.
func (LogAdaptor) TraceHere ¶ added in v1.3.0
func (la LogAdaptor) TraceHere()
TraceHere logs the function name, source file and line number of the call site.
func (LogAdaptor) Warnf ¶ added in v1.2.0
func (la LogAdaptor) Warnf(format string, values ...interface{})
Warnf formats the given string with the given values, if logger level is warn or finer.