diff --git a/cmd/check/main.go b/cmd/check/main.go index dd63620..e89c7bf 100644 --- a/cmd/check/main.go +++ b/cmd/check/main.go @@ -32,6 +32,10 @@ func main() { return } + if req.Source.Log != "" { + logrus.Info(req.Source.Log) + } + if req.Source.CheckDelay != "" { delay, err := time.ParseDuration(req.Source.CheckDelay) if err != nil { diff --git a/cmd/in/main.go b/cmd/in/main.go index 75a3825..d3f4118 100644 --- a/cmd/in/main.go +++ b/cmd/in/main.go @@ -51,6 +51,10 @@ func main() { dest := os.Args[1] + if req.Source.Log != "" { + logrus.Info(req.Source.Log) + } + privileged, err := resource.IsPrivileged() if err != nil { logrus.Fatalf("could not check privilege: %s", err) diff --git a/cmd/out/main.go b/cmd/out/main.go index b4e91e4..116ed55 100644 --- a/cmd/out/main.go +++ b/cmd/out/main.go @@ -45,6 +45,10 @@ func main() { return } + if req.Source.Log != "" { + logrus.Info(req.Source.Log) + } + if req.Params.Version == "" { logrus.Fatal("no version specified") return diff --git a/types.go b/types.go index e5213e2..547188c 100644 --- a/types.go +++ b/types.go @@ -33,6 +33,9 @@ type Source struct { // hardcoded metadata values to return on every get and put Metadata []MetadataField `json:"metadata"` + + // print a message on every action + Log string `json:"log"` } func (s Source) InitialVersion() string {