diff --git a/config/config.go b/config/config.go index 12684538..4dac5c13 100644 --- a/config/config.go +++ b/config/config.go @@ -14,6 +14,7 @@ import ( "strconv" "code.google.com/p/go.crypto/bcrypt" + "github.com/syncthing/syncthing/events" "github.com/syncthing/syncthing/logger" "github.com/syncthing/syncthing/osutil" "github.com/syncthing/syncthing/protocol" @@ -260,6 +261,7 @@ func (cfg *Configuration) Save() error { if err != nil { l.Warnln("Saving config:", err) } + events.Default.Log(events.ConfigSaved, cfg) return err } diff --git a/events/events.go b/events/events.go index 829e4b87..a82878a0 100644 --- a/events/events.go +++ b/events/events.go @@ -26,6 +26,7 @@ const ( ItemStarted StateChanged RepoRejected + ConfigSaved AllEvents = ^EventType(0) ) @@ -56,6 +57,8 @@ func (t EventType) String() string { return "StateChanged" case RepoRejected: return "RepoRejected" + case ConfigSaved: + return "ConfigSaved" default: return "Unknown" }