Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Get = &cobra.Command{ Use: "get", Short: "Get log events", Long: "", Run: func(cmd *cobra.Command, args []string) { }, }
View Source
var GroupsCommand = &cobra.Command{ Use: "groups", Short: "List log groups", Long: "", Run: func(cmd *cobra.Command, args []string) { b := blade.NewBlade(&groupsConfig) logGroups := b.GetLogGroups() for _, group := range logGroups { fmt.Println(*group.LogGroupName) } }, }
View Source
var SawCommand = &cobra.Command{ Use: "saw", Short: "A fast, multipurpose tool for AWS CloudWatch Logs", Long: "Saw is a fast, multipurpose tool for cutting through AWS CloudWatch Logs.", Example: ` saw version saw groups --prefix "/aws" saw streams production --prefix "api"`, Run: func(cmd *cobra.Command, args []string) { cmd.HelpFunc()(cmd, args) }, }
View Source
var StreamsCommand = &cobra.Command{ Use: "streams <log group>", Short: "List streams in log group", Long: "", Args: func(cmd *cobra.Command, args []string) error { if len(args) < 1 { return errors.New("listing streams requires log group argument") } return nil }, Run: func(cmd *cobra.Command, args []string) { streamsConfig.Group = args[0] b := blade.NewBlade(&streamsConfig) logStreams := b.GetLogStreams() for _, stream := range logStreams { fmt.Println(*stream.LogStreamName) } }, }
View Source
var VersionCommand = &cobra.Command{ Use: "version", Short: "Prints the version string", Long: "", Run: func(cmd *cobra.Command, args []string) { fmt.Printf("v%s\n", version) }, }
View Source
var WatchCommand = &cobra.Command{ Use: "watch <log group>", Short: "Continously stream log events", Long: "", Args: func(cmd *cobra.Command, args []string) error { if len(args) < 1 { return errors.New("watching streams requires log group argument") } return nil }, Run: func(cmd *cobra.Command, args []string) { watchConfig.Group = args[0] b := blade.NewBlade(&watchConfig) b.StreamEvents() }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.