Forward stdout and stderr from plugin to tusd

This commit is contained in:
Marius 2021-12-10 12:32:33 +01:00
parent ea62277eb8
commit bccca4935a
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package hooks
import ( import (
"log" "log"
"net/rpc" "net/rpc"
"os"
"os/exec" "os/exec"
"github.com/hashicorp/go-plugin" "github.com/hashicorp/go-plugin"
@ -23,6 +24,8 @@ func (h *PluginHook) Setup() error {
HandshakeConfig: handshakeConfig, HandshakeConfig: handshakeConfig,
Plugins: pluginMap, Plugins: pluginMap,
Cmd: exec.Command(h.Path), Cmd: exec.Command(h.Path),
SyncStdout: os.Stdout,
SyncStderr: os.Stderr,
//Logger: logger, //Logger: logger,
}) })
//defer client.Kill() //defer client.Kill()