diff options
Diffstat (limited to 'internal/clients/tailclient.go')
| -rw-r--r-- | internal/clients/tailclient.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/clients/tailclient.go b/internal/clients/tailclient.go index 15e77cc..53b5ba4 100644 --- a/internal/clients/tailclient.go +++ b/internal/clients/tailclient.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/mimecast/dtail/internal/clients/handlers" + "github.com/mimecast/dtail/internal/io/logger" "github.com/mimecast/dtail/internal/omode" ) @@ -26,7 +27,8 @@ func NewTailClient(args Args) (*TailClient, error) { }, } - c.init(c) + c.init() + c.makeConnections(c) return &c, nil } @@ -36,8 +38,9 @@ func (c TailClient) makeHandler(server string) handlers.Handler { func (c TailClient) makeCommands() (commands []string) { for _, file := range strings.Split(c.What, ",") { - commands = append(commands, fmt.Sprintf("%s %s regex %s", c.Mode.String(), file, c.Regex)) + commands = append(commands, fmt.Sprintf("%s %s %s", c.Mode.String(), file, c.Regex.Serialize())) } + logger.Debug(commands) return } |
