Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Add warning were no log analyzed
Browse files Browse the repository at this point in the history
  • Loading branch information
dwisiswant0 committed Mar 16, 2021
1 parent 1aa2797 commit e763628
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func removeLBR(s string) string {
func New(options *common.Options) {
var input *os.File
var out string
var pass int

metric, promserve, promendpoint := prometheus(options)
if metric {
Expand Down Expand Up @@ -116,10 +117,15 @@ func New(options *common.Options) {
break
}
jobs <- line
pass++
}

close(jobs)

swg.Wait()

// fmt.Println(pass)
if pass == 0 {
gologger.Warning().Msg("No logs analyzed, did you write log format correctly?")
}
gologger.Info().Msg("Done!")
}

0 comments on commit e763628

Please sign in to comment.