diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index fecfe18ad3..9e125484f8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
- go-version: 1.19.x
+ go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
run: |
@@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
- go-version: 1.19.x
+ go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
run: |
@@ -44,7 +44,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
- go-version: 1.19.x
+ go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
run: |
diff --git a/cmd/skywire-cli/commands/log/root.go b/cmd/skywire-cli/commands/log/root.go
index 18c3c20728..5340174cff 100644
--- a/cmd/skywire-cli/commands/log/root.go
+++ b/cmd/skywire-cli/commands/log/root.go
@@ -12,9 +12,11 @@ import (
"net/http"
"os"
"sync"
+ "sync/atomic"
"time"
"github.com/hashicorp/go-version"
+ "github.com/sirupsen/logrus"
"github.com/skycoin/dmsg/pkg/dmsgget"
"github.com/skycoin/dmsg/pkg/dmsghttp"
"github.com/spf13/cobra"
@@ -38,6 +40,9 @@ var (
logOnly bool
surveyOnly bool
deleteOnErrors bool
+ fetchFile string
+ fetchFrom string
+ writeDir string
)
func init() {
@@ -45,9 +50,12 @@ func init() {
logCmd.Flags().StringVarP(&env, "env", "e", "prod", "deployment to get uptimes from")
logCmd.Flags().BoolVarP(&logOnly, "log", "l", false, "fetch only transport logs")
logCmd.Flags().BoolVarP(&surveyOnly, "survey", "v", false, "fetch only surveys")
+ logCmd.Flags().StringVarP(&fetchFile, "file", "f", "", "fetch only a specific file from all online visors")
+ logCmd.Flags().StringVarP(&fetchFrom, "pks", "k", "", "fetch only from specific public keys ; semicolon separated")
+ logCmd.Flags().StringVarP(&writeDir, "dir", "d", "log_collecting", "save files to specified dir")
logCmd.Flags().BoolVarP(&deleteOnErrors, "clean", "c", false, "delete files and folders on errors")
- logCmd.Flags().StringVar(&minv, "minv", "v1.3.4", "minimum visor version to fetch from")
- logCmd.Flags().IntVarP(&duration, "duration", "n", 0, "numberof days before today to fetch transport logs for")
+ logCmd.Flags().StringVar(&minv, "minv", "v1.3.11", "minimum visor version to fetch from")
+ logCmd.Flags().IntVarP(&duration, "duration", "n", 0, "number of days before today to fetch transport logs for")
logCmd.Flags().BoolVar(&allVisors, "all", false, "consider all visors ; no version filtering")
logCmd.Flags().IntVar(&batchSize, "batchSize", 50, "number of visor in each batch")
logCmd.Flags().Int64Var(&maxFileSize, "maxfilesize", 30, "maximum file size allowed to download during collecting logs, in KB")
@@ -59,13 +67,13 @@ func init() {
logCmd.Flags().VarP(&sk, "sk", "s", "a random key is generated if unspecified\n\r")
}
-// RootCmd is surveyCmd
+// RootCmd is logCmd
var RootCmd = logCmd
var logCmd = &cobra.Command{
Use: "log",
Short: "survey & transport log collection",
- Long: "collect surveys and transport logging from visors which are online in the uptime tracker",
+ Long: "Fetch health, survey, and transport logging from visors which are online in the uptime tracker\nhttp://ut.skywire.skycoin.com/uptimes?v=v2\nhttp://ut.skywire.skycoin.com/uptimes?v=v2&visors=
+
-
+
@@ -18,21 +19,19 @@
-
-
-
-
+
+
+
+
-Get The Module
-|
Documentation
|
Contributing
@@ -49,11 +48,6 @@
AtomicGo | schedule
-
-
- -----------------------------------------------------------------------------------------------------
-
-
- - ----------------------------------------------------------------------------------------------------- - - |
+ + ```go package main @@ -143,7 +136,8 @@ func main() {
+ + ```go package main @@ -178,17 +174,20 @@ func main() {
+ + ```go package main @@ -200,8 +199,9 @@ import ( ) func main() { - task := schedule.Every(5*time.Second, func() { - fmt.Println("5 seconds are over!") + task := schedule.Every(time.Second, func() bool { + fmt.Println("1 second is over!") + return true // return false to stop the task }) fmt.Println("Some stuff happening...") @@ -215,7 +215,8 @@ func main() {