fynelabs / selfupdate

Build self-updating Golang programs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you add a debug mode?

junmaqiang opened this issue · comments

Hope to add a mode so that all upgrades can be seen. Now it's a black box, no way to track it

	_, err := selfupdate.Manage(config) 
	if err != nil {
		fmt.Println("ERROR: ", err)
		return
	}

selfupdate.Manage is largely asynchronous. That's why we provide logging interface:
selfupdate.LogError, selfupdate.LogInfo and selfupdate.LogDebug . You just need to set the logging function you want to it and you are good to go. Is that good enough for your use case?