Skip to content

Commit 8b4f282

Browse files
refact: remove post always
1 parent 5797109 commit 8b4f282

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ go-watch-logs --file-path=my.log --match='HTTP/1.1" 50' --every=60
8181
on minimum num of matches, it should notify (default 1)
8282
-ms-teams-hook string
8383
ms teams webhook
84-
-post-always string
85-
run this shell command after every scan
8684
-post-min string
8785
run this shell command after every scan when min errors are found
8886
-proxy string

main.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ func cron() {
102102
for _, filePath := range filePaths {
103103
watch(filePath)
104104
}
105-
if f.PostAlways != "" {
106-
if _, err := pkg.ExecShell(f.PostAlways); err != nil {
107-
slog.Error("Error running post command", "error", err.Error())
108-
}
109-
}
110105
}
111106

112107
func syncFilePaths() {

pkg/flags.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ type Flags struct {
1010
Match string
1111
Ignore string
1212
DBPath string
13-
PostAlways string
1413
PostCommand string
1514
LogFile string
1615

@@ -33,7 +32,6 @@ func Parseflags(f *Flags) {
3332
flag.StringVar(&f.DBPath, "db-path", GetHomedir()+"/.go-watch-logs.db", "path to store db file.")
3433
flag.StringVar(&f.Match, "match", "", "regex for matching errors (empty to match all lines)")
3534
flag.StringVar(&f.Ignore, "ignore", "", "regex for ignoring errors (empty to ignore none)")
36-
flag.StringVar(&f.PostAlways, "post-always", "", "run this shell command after every scan")
3735
flag.StringVar(&f.PostCommand, "post-cmd", "", "run this shell command after every scan when min errors are found")
3836
flag.Uint64Var(&f.Every, "every", 0, "run every n seconds (0 to run once)")
3937
flag.Uint64Var(&f.HealthCheckEvery, "health-check-every", 0, `run health check every n seconds (0 to disable)

0 commit comments

Comments
 (0)