mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
fix output formatting
This commit is contained in:
parent
a0f890fed7
commit
e14eeb914f
5 changed files with 6 additions and 6 deletions
BIN
bin/go-proxy
BIN
bin/go-proxy
Binary file not shown.
|
@ -193,7 +193,7 @@ func (p *Provider) grWatchDockerChanges() {
|
|||
return
|
||||
case msg := <-msgChan:
|
||||
// TODO: handle actor only
|
||||
p.Logf("Event", "%s %s caused rebuild", msg.Action, msg.Actor.Attributes["name"])
|
||||
p.Logf("Event", "container %s %s caused rebuild", msg.Actor.Attributes["name"], msg.Action)
|
||||
p.StopAllRoutes()
|
||||
p.BuildStartRoutes()
|
||||
case err := <-errChan:
|
||||
|
|
|
@ -62,16 +62,16 @@ func (p *Provider) grWatchFileChanges() {
|
|||
}
|
||||
switch {
|
||||
case event.Has(fsnotify.Write):
|
||||
p.Logf("Watcher", "file change detected", p.name)
|
||||
p.Logf("Watcher", "file change detected")
|
||||
p.StopAllRoutes()
|
||||
p.BuildStartRoutes()
|
||||
case event.Has(fsnotify.Remove), event.Has(fsnotify.Rename):
|
||||
p.Logf("Watcher", "file renamed / deleted", p.name)
|
||||
p.Logf("Watcher", "file renamed / deleted")
|
||||
p.StopAllRoutes()
|
||||
}
|
||||
case err := <-watcher.Errors:
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
p.Errorf("Watcher", "File watcher error: %s", p.name, err)
|
||||
p.Errorf("Watcher", "File watcher error: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ func (p *Provider) GetProxyConfigs() ([]*ProxyConfig, error) {
|
|||
func (p *Provider) StopAllRoutes() {
|
||||
p.mutex.Lock()
|
||||
defer p.mutex.Unlock()
|
||||
|
||||
|
||||
if p.stopWatching == nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ func (route *StreamRouteBase) SetupListen() {
|
|||
return
|
||||
}
|
||||
route.ListeningPort = freePort
|
||||
route.Logf("Assigned free port %s", route.ListeningPort)
|
||||
route.Logf("Assigned free port %v", route.ListeningPort)
|
||||
}
|
||||
route.Logf("Listening on %s", route.ListeningUrl())
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue