Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - Variables
 - func Debugf(format string, args ...interface{})
 - func EnableDebugMode()
 - func Errorf(format string, args ...interface{})
 - func Infof(format string, args ...interface{})
 - func SetLogger(l Logger)
 - func ShouldLog(level LogLevel) bool
 - func Warningf(format string, args ...interface{})
 - type LogLevel
 - type Logger
 
Constants ¶
      View Source
      
  
const DebugEnv = "SCW_DEBUG"
    Variables ¶
      View Source
      
  
var DefaultLogger = newLogger(os.Stderr, LogLevelWarning)
    Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs to the DEBUG log. Arguments are handled in the manner of fmt.Printf.
func EnableDebugMode ¶
func EnableDebugMode()
EnableDebugMode enable LogLevelDebug on the default logger. If a custom logger was provided with SetLogger this method has no effect.
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs to the ERROR log. Arguments are handled in the manner of fmt.Printf.
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs to the INFO log. Arguments are handled in the manner of fmt.Printf.
func SetLogger ¶
func SetLogger(l Logger)
SetLogger sets logger that is used in by the SDK. Not mutex-protected, should be called before any scaleway-sdk-go functions.
Types ¶
type Logger ¶
type Logger interface {
	// Debugf logs to DEBUG log. Arguments are handled in the manner of fmt.Printf.
	Debugf(format string, args ...interface{})
	// Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf.
	Infof(format string, args ...interface{})
	// Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf.
	Warningf(format string, args ...interface{})
	// Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.
	Errorf(format string, args ...interface{})
	// ShouldLog reports whether verbosity level l is at least the requested verbose level.
	ShouldLog(level LogLevel) bool
}
    Logger does underlying logging work for scaleway-sdk-go.
 Click to show internal directories. 
   Click to hide internal directories.