Browse Source

clarify doc on onsuccess in parsers + add new date formats for dateparse (#703)

Thibault "bui" Koechlin 4 years ago
parent
commit
1938e1a62d
2 changed files with 3 additions and 1 deletions
  1. 1 1
      docs/v1.X/docs/references/parsers.md
  2. 2 0
      pkg/parser/enrich.go

+ 1 - 1
docs/v1.X/docs/references/parsers.md

@@ -243,7 +243,7 @@ onsuccess: next_stage|continue
 
 _default: continue_
 
-if set to `next_stage` and the node is considered successful, the {{v1X.event.name}} will be moved directly to next stage without processing other nodes in the current stage.
+if set to `next_stage` and the node is considered successful, the {{v1X.event.name}} will be moved directly to the next stage without processing other nodes in the current stage. _note: if it's a parser tree, and a "leaf" node succeeds, it is the parent's "onsuccess" that is evaluated._
 
 ### `pattern_syntax`
 

+ 2 - 0
pkg/parser/enrich.go

@@ -66,6 +66,8 @@ func GenDateParse(date string) (string, time.Time) {
 		"2006/01/02 15:04",
 		"2006-01-02",
 		"2006-01-02 15:04",
+		"2006/01/02 15:04:05",
+		"2006-01-02 15:04:05",
 	}
 
 	for _, dateFormat := range layouts {