Skip to content

Commit e2c44ad

Browse files
authored
Merge pull request DataDog#8928 from DataDog/pranay/add-regex-example-multiline
Update advanced_log_collection.md
2 parents 2fe817f + 49bafc4 commit e2c44ad

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

content/en/agent/logs/advanced_log_collection.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,13 @@ spec:
400400

401401
More examples:
402402

403-
| **Raw string** | **Pattern** |
404-
|--------------------------|--------------------------------------------|
405-
| 14:20:15 | `\d{2}:\d{2}:\d{2}` |
406-
| 11/10/2014 | `\d{2}\/\d{2}\/\d{4}` |
407-
| Thu Jun 16 08:29:03 2016 | `\w{3}\s+\w{3}\s+\d{2}\s\d{2}:\d{2}:\d{2}` |
408-
| 20180228 | `\d{8}` |
403+
| **Raw string** | **Pattern** |
404+
|--------------------------|-----------------------------------------------|
405+
| 14:20:15 | `\d{2}:\d{2}:\d{2}` |
406+
| 11/10/2014 | `\d{2}\/\d{2}\/\d{4}` |
407+
| Thu Jun 16 08:29:03 2016 | `\w{3}\s+\w{3}\s+\d{2}\s\d{2}:\d{2}:\d{2}` |
408+
| 20180228 | `\d{8}` |
409+
| 2020-10-27 05:10:49.657 | `\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{3}` |
409410

410411
**Note**: Regex patterns for multi-line logs must start at the **beginning** of a log. Patterns cannot be matched mid-line.
411412

@@ -515,6 +516,7 @@ All the logs collected by the Datadog Agent are impacted by the global processin
515516
<br>
516517
*Logging without Limits is a trademark of Datadog, Inc.
517518

519+
518520
[1]: /agent/faq/commonly-used-log-processing-rules
519521
[2]: https://docs.datadoghq.com/logs/explorer/#overview
520522
[3]: /agent/guide/agent-configuration-files/#agent-main-configuration-file

0 commit comments

Comments
 (0)