Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ func (p *Plugin) Meta() Meta {
}
}

func (p *Plugin) PackageAndVersion() string {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to do a Stringer without any input, but not opposed to it.

return fmt.Sprintf("%s/%s/%s@%s", p.team, p.kind, p.name, p.version)
}

// SetSkipUsageClient sets whether the usage client should be skipped
func (p *Plugin) SetSkipUsageClient(v bool) {
p.skipUsageClient = v
Expand Down
4 changes: 1 addition & 3 deletions serve/info.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package serve

import (
"fmt"

"github.com/spf13/cobra"
)

Expand All @@ -18,7 +16,7 @@ func (s *PluginServe) newCmdPluginInfo() *cobra.Command {
Long: pluginInfoLong,
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, _ []string) error {
cmd.Println(fmt.Sprintf("Package and version: %s/%s/%s@%s", s.plugin.Team(), s.plugin.Kind(), s.plugin.Name(), s.plugin.Version()))
cmd.Println("Package and version:", s.plugin.PackageAndVersion())
return nil
},
}
Expand Down
2 changes: 1 addition & 1 deletion serve/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (s *PluginServe) newCmdPluginServe() *cobra.Command {
}
}()

logger.Info().Str("address", listener.Addr().String()).Msg("Plugin server listening")
logger.Info().Str("address", listener.Addr().String()).Str("plugin", s.plugin.PackageAndVersion()).Msg("Plugin server listening")
Copy link
Copy Markdown
Member Author

@disq disq Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old line was:

{"address":"/tmp/cq-....sock","message":"Plugin server listening","module":"aws-source"}

if err := grpcServer.Serve(listener); err != nil {
return fmt.Errorf("failed to serve: %w", err)
}
Expand Down
Loading