Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLevel

func GetLevel(module string) api.Level

    GetLevel - getting log level for given module

    func HideCallerInfo

    func HideCallerInfo(module string, level api.Level)

      HideCallerInfo - Do not show caller info in log lines for given log level

      func InitLogger

      func InitLogger(l api.LoggerProvider)

        InitLogger sets custom logger which will be used over deflogger. It is required to call this function before making any loggings.

        func IsEnabledFor

        func IsEnabledFor(module string, level api.Level) bool

          IsEnabledFor - Check if given log level is enabled for given module

          func LoggerProvider

          func LoggerProvider() api.LoggerProvider

            LoggerProvider returns logging provider for SDK logger

            func SetLevel

            func SetLevel(module string, level api.Level)

              SetLevel - setting log level for given module

              func ShowCallerInfo

              func ShowCallerInfo(module string, level api.Level)

                ShowCallerInfo - Show caller info in log lines for given log level

                func VerifyBasicLogging

                func VerifyBasicLogging(t *testing.T, level api.Level, loggerFunc fn, loggerFuncf fnf, buf *bytes.Buffer, verifyCustom bool, moduleName string)

                  VerifyBasicLogging utility func which does job calling and verifying basic log level functions - DEBUG, INFO, ERROR, WARNING

                  func VerifyCriticalLoggings

                  func VerifyCriticalLoggings(t *testing.T, level api.Level, loggerFunc fn, loggerFuncf fnf, buf fmt.Stringer)

                    VerifyCriticalLoggings utility func which does job calling and verifying CRITICAL log level functions - PANIC

                    Types

                    type Log

                    type Log struct {
                    	// contains filtered or unexported fields
                    }

                      Log is a standard SDK logger implementation

                      func (*Log) ChangeOutput

                      func (l *Log) ChangeOutput(output io.Writer)

                        ChangeOutput for changing output destination for the logger.

                        func (*Log) Debug

                        func (l *Log) Debug(args ...interface{})

                          Debug calls go log.Output. Arguments are handled in the manner of fmt.Print.

                          func (*Log) Debugf

                          func (l *Log) Debugf(format string, args ...interface{})

                            Debugf calls go log.Output. Arguments are handled in the manner of fmt.Printf.

                            func (*Log) Debugln

                            func (l *Log) Debugln(args ...interface{})

                              Debugln calls go log.Output. Arguments are handled in the manner of fmt.Println.

                              func (*Log) Error

                              func (l *Log) Error(args ...interface{})

                                Error calls go log.Output. Arguments are handled in the manner of fmt.Print.

                                func (*Log) Errorf

                                func (l *Log) Errorf(format string, args ...interface{})

                                  Errorf calls go log.Output. Arguments are handled in the manner of fmt.Printf.

                                  func (*Log) Errorln

                                  func (l *Log) Errorln(args ...interface{})

                                    Errorln calls go log.Output. Arguments are handled in the manner of fmt.Println.

                                    func (*Log) Fatal

                                    func (l *Log) Fatal(args ...interface{})

                                      Fatal is CRITICAL log followed by a call to os.Exit(1).

                                      func (*Log) Fatalf

                                      func (l *Log) Fatalf(format string, args ...interface{})

                                        Fatalf is CRITICAL log formatted followed by a call to os.Exit(1).

                                        func (*Log) Fatalln

                                        func (l *Log) Fatalln(args ...interface{})

                                          Fatalln is CRITICAL log ln followed by a call to os.Exit(1).

                                          func (*Log) Info

                                          func (l *Log) Info(args ...interface{})

                                            Info calls go log.Output. Arguments are handled in the manner of fmt.Print.

                                            func (*Log) Infof

                                            func (l *Log) Infof(format string, args ...interface{})

                                              Infof calls go log.Output. Arguments are handled in the manner of fmt.Printf.

                                              func (*Log) Infoln

                                              func (l *Log) Infoln(args ...interface{})

                                                Infoln calls go log.Output. Arguments are handled in the manner of fmt.Println.

                                                func (*Log) Panic

                                                func (l *Log) Panic(args ...interface{})

                                                  Panic is CRITICAL log followed by a call to panic()

                                                  func (*Log) Panicf

                                                  func (l *Log) Panicf(format string, args ...interface{})

                                                    Panicf is CRITICAL log formatted followed by a call to panic()

                                                    func (*Log) Panicln

                                                    func (l *Log) Panicln(args ...interface{})

                                                      Panicln is CRITICAL log ln followed by a call to panic()

                                                      func (*Log) Print

                                                      func (l *Log) Print(args ...interface{})

                                                        Print calls go log.Output. Arguments are handled in the manner of fmt.Print.

                                                        func (*Log) Printf

                                                        func (l *Log) Printf(format string, args ...interface{})

                                                          Printf calls go log.Output. Arguments are handled in the manner of fmt.Printf.

                                                          func (*Log) Println

                                                          func (l *Log) Println(args ...interface{})

                                                            Println calls go log.Output. Arguments are handled in the manner of fmt.Println.

                                                            func (*Log) Warn

                                                            func (l *Log) Warn(args ...interface{})

                                                              Warn calls go log.Output. Arguments are handled in the manner of fmt.Print.

                                                              func (*Log) Warnf

                                                              func (l *Log) Warnf(format string, args ...interface{})

                                                                Warnf calls go log.Output. Arguments are handled in the manner of fmt.Printf.

                                                                func (*Log) Warnln

                                                                func (l *Log) Warnln(args ...interface{})

                                                                  Warnln calls go log.Output. Arguments are handled in the manner of fmt.Println.

                                                                  type Provider

                                                                  type Provider struct {
                                                                  }

                                                                    Provider is the default logger implementation

                                                                    func (*Provider) GetLogger

                                                                    func (p *Provider) GetLogger(module string) api.Logger

                                                                      GetLogger returns SDK logger implementation