@@ -101,7 +101,7 @@ func Changes(signals chan os.Signal) {
101101 cnf := utils .GetConfig ()
102102 watcher , err := fsnotify .NewWatcher ()
103103 if err != nil {
104- catcher .Error ("Could not create a new watcher" , err , map [ string ] any {} )
104+ catcher .Error ("Could not create a new watcher" , err , nil )
105105 }
106106 defer watcher .Close ()
107107
@@ -111,16 +111,16 @@ func Changes(signals chan os.Signal) {
111111 select {
112112 case err , ok := <- watcher .Errors :
113113 if ! ok {
114- catcher .Error ("Could not detect changes in ruleset" , err , map [ string ] any {} )
114+ catcher .Error ("Could not detect changes in ruleset" , err , nil )
115115 }
116116 case event , ok := <- watcher .Events :
117117 if ! ok {
118- catcher .Error ("Error trying to detect changes in ruleset" , err , map [ string ] any {} )
118+ catcher .Error ("Error trying to detect changes in ruleset" , err , nil )
119119 }
120120 if event .Op & fsnotify .Write == fsnotify .Write {
121121 if event .Name != cnf .RulesFolder + "system/.git/FETCH_HEAD" {
122122 catcher .Info ("Changes detected in" , map [string ]any {"file" : event .Name })
123- catcher .Info ("Restarting correlation engine" , map [ string ] any {} )
123+ catcher .Info ("Restarting correlation engine" , nil )
124124 signals <- os .Interrupt
125125 }
126126 }
@@ -134,7 +134,7 @@ func Changes(signals chan os.Signal) {
134134 for {
135135 err := filepath .Walk (cnf .RulesFolder , func (path string , info os.FileInfo , err error ) error {
136136 if err != nil {
137- catcher .Error ("Could not list rules folders" , err , map [ string ] any {} )
137+ catcher .Error ("Could not list rules folders" , err , nil )
138138 }
139139 n := true
140140 if info .IsDir () {
@@ -147,15 +147,15 @@ func Changes(signals chan os.Signal) {
147147 if n {
148148 folders = append (folders , path )
149149 if err := watcher .Add (path ); err != nil {
150- catcher .Error ("Could not start watcher for a rules folder" , err , map [ string ] any {} )
150+ catcher .Error ("Could not start watcher for a rules folder" , err , nil )
151151 }
152152
153153 }
154154 }
155155 return nil
156156 })
157157 if err != nil {
158- catcher .Error ("Could not list rules folders" , err , map [ string ] any {} )
158+ catcher .Error ("Could not list rules folders" , err , nil )
159159 continue
160160 }
161161
0 commit comments