Commit da02e31 1 parent 2ed90ca commit da02e31 Copy full SHA for da02e31
File tree 4 files changed +9
-9
lines changed
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ package main
2
2
3
3
import (
4
4
"fmt"
5
+ log "github.com/sirupsen/logrus"
5
6
"os"
6
7
"path/filepath"
7
8
"strconv"
8
9
"syscall"
9
- log "github.com/sirupsen/logrus"
10
10
)
11
11
12
12
func fileGetAbsolutePath (path string ) (string , os.FileInfo ) {
Original file line number Diff line number Diff line change 6
6
7
7
func LogCronjobToFields (cronjob CrontabEntry ) log.Fields {
8
8
return log.Fields {
9
- "spec" : cronjob .Spec ,
10
- "user" : cronjob .User ,
9
+ "spec" : cronjob .Spec ,
10
+ "user" : cronjob .User ,
11
11
"command" : cronjob .Command ,
12
12
}
13
13
}
Original file line number Diff line number Diff line change 4
4
"fmt"
5
5
flags "github.com/jessevdk/go-flags"
6
6
"github.com/prometheus/client_golang/prometheus/promhttp"
7
+ log "github.com/sirupsen/logrus"
7
8
"net/http"
8
9
"os"
9
10
"os/signal"
@@ -12,7 +13,6 @@ import (
12
13
"runtime"
13
14
"strings"
14
15
"syscall"
15
- log "github.com/sirupsen/logrus"
16
16
)
17
17
18
18
const (
@@ -45,12 +45,12 @@ var opts struct {
45
45
ShowHelp bool `short:"h" long:"help" description:"show this help message"`
46
46
47
47
// logger
48
- Verbose bool `short:"v" long:"verbose" description:"verbose mode"`
49
- LogJson bool ` long:"log.json" description:"Switch log output to json format"`
48
+ Verbose bool `short:"v" long:"verbose" description:"verbose mode"`
49
+ LogJson bool ` long:"log.json" description:"Switch log output to json format"`
50
50
51
51
// server settings
52
- ServerBind string `long:"server.bind" env:"SERVER_BIND" description:"Server address (eg. prometheus metrics)" default:":8080"`
53
- ServerMetrics bool `long:"server.metrics" env:"SERVER_METRICS" description:"Enable prometheus metrics (do not use senstive informations in commands -> use environment variables or files for storing these informations)"`
52
+ ServerBind string `long:"server.bind" env:"SERVER_BIND" description:"Server address (eg. prometheus metrics)" default:":8080"`
53
+ ServerMetrics bool `long:"server.metrics" env:"SERVER_METRICS" description:"Enable prometheus metrics (do not use senstive informations in commands -> use environment variables or files for storing these informations)"`
54
54
}
55
55
56
56
var argparser * flags.Parser
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import (
4
4
"fmt"
5
5
"github.com/prometheus/client_golang/prometheus"
6
6
"github.com/robfig/cron"
7
+ log "github.com/sirupsen/logrus"
7
8
"os"
8
9
"os/exec"
9
10
"os/user"
10
11
"strconv"
11
12
"strings"
12
13
"syscall"
13
14
"time"
14
- log "github.com/sirupsen/logrus"
15
15
)
16
16
17
17
type Runner struct {
You can’t perform that action at this time.
0 commit comments