diff options
Diffstat (limited to 'src/state.go')
| -rw-r--r-- | src/state.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/state.go b/src/state.go index 12ad57a..521390e 100644 --- a/src/state.go +++ b/src/state.go @@ -11,6 +11,9 @@ type VPNState struct { // The list of servers and organizations from disco DiscoList *DiscoList `json:"disco"` + + // The file we keep open for logging + LogFile *FileLogger `json:"-"` } func (state *VPNState) Register(name string, directory string, stateCallback func(string, string, string)) error { @@ -18,6 +21,11 @@ func (state *VPNState) Register(name string, directory string, stateCallback fun state.ConfigDirectory = directory state.StateCallback = stateCallback + // Initialize the logger + state.InitLog(LOG_WARNING) + + state.Log(LOG_INFO, "App Registered") + state.StateCallback("Start", "Registered", "app registered") // Try to load the previous configuration |
