summaryrefslogtreecommitdiff
path: root/internal/fsm
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fsm')
-rw-r--r--internal/fsm/fsm.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/fsm/fsm.go b/internal/fsm/fsm.go
index c87fd4f..b822a72 100644
--- a/internal/fsm/fsm.go
+++ b/internal/fsm/fsm.go
@@ -8,7 +8,6 @@ import (
"path"
"sort"
- "github.com/jwijenbergh/eduvpn-common/internal/log"
"github.com/jwijenbergh/eduvpn-common/internal/types"
)
@@ -126,12 +125,11 @@ type FSM struct {
// Info to be passed from the parent state
Name string
StateCallback func(string, string, string)
- Logger *log.FileLogger
Directory string
Debug bool
}
-func (fsm *FSM) Init(name string, callback func(string, string, string), logger *log.FileLogger, directory string, debug bool) {
+func (fsm *FSM) Init(name string, callback func(string, string, string), directory string, debug bool) {
fsm.States = FSMStates{
DEREGISTERED: FSMState{Transitions: []FSMTransition{{NO_SERVER, "Client registers"}}},
NO_SERVER: FSMState{Transitions: []FSMTransition{{CHOSEN_SERVER, "User chooses a server"}, {SEARCH_SERVER, "The user is trying to choose a Server in the UI"}, {CONNECTED, "The user is already connected"}}},
@@ -150,7 +148,6 @@ func (fsm *FSM) Init(name string, callback func(string, string, string), logger
fsm.Current = DEREGISTERED
fsm.Name = name
fsm.StateCallback = callback
- fsm.Logger = logger
fsm.Directory = directory
fsm.Debug = debug
}
@@ -180,7 +177,6 @@ func (fsm *FSM) writeGraph() {
graphImgFile := fsm.getGraphFilename(".png")
f, err := os.Create(graphFile)
if err != nil {
- fsm.Logger.Log(log.LOG_INFO, fmt.Sprintf("Failed to write debug fsm graph with error %v", err))
return
}
@@ -205,8 +201,6 @@ func (fsm *FSM) GoTransitionWithData(newState FSMStateID, data string, backgroun
fsm.writeGraph()
}
- fsm.Logger.Log(log.LOG_INFO, fmt.Sprintf("State: %s -> State: %s with data %s\n", oldState.String(), newState.String(), data))
-
if background {
go fsm.StateCallback(oldState.String(), newState.String(), data)
} else {