Documentation
¶
Index ¶
Constants ¶
View Source
const DebugEnv = "SCW_DEBUG"
Variables ¶
View Source
var (
DefaultLogger = newLogger(os.Stderr, LogLevelWarning)
)
Functions ¶
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 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 ...any)
// Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf.
Infof(format string, args ...any)
// Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf.
Warningf(format string, args ...any)
// Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.
Errorf(format string, args ...any)
// 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.