Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 783 Bytes

File metadata and controls

33 lines (23 loc) · 783 Bytes

← Error Handling | Debugging(中文) | Overview →


Debugging

Enable Debug Mode

Debug logs are disabled by default. Enable via WithDebug(true).

config := volcengine.NewConfig().
	WithRegion(region).
	WithDebug(true).
	WithCredentials(credentials.NewEnvCredentials())

Log Output

By default, logs are written to os.Stdout. Use WithLogWriter to write to a file or other writer.

file, _ := os.Create("sdk.log")
config := volcengine.NewConfig().
	WithRegion(region).
	WithDebug(true).
	WithLogWriter(file).
	WithCredentials(credentials.NewEnvCredentials())

← Error Handling | Debugging(中文) | Overview →