summaryrefslogtreecommitdiffstats
path: root/src/formats/block_log.json
diff options
context:
space:
mode:
Diffstat (limited to 'src/formats/block_log.json')
-rw-r--r--src/formats/block_log.json23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/formats/block_log.json b/src/formats/block_log.json
new file mode 100644
index 0000000..aaba6d8
--- /dev/null
+++ b/src/formats/block_log.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "block_log": {
+ "title": "Generic Block",
+ "description": "A generic format for logs, like cron, that have a date at the start of a block.",
+ "regex": {
+ "std": {
+ "pattern": "^(?<timestamp>\\S{3,8} \\w{3}\\s+\\d{1,2} \\d{2}:\\d{2}:\\d{2} \\w+ \\d{4})\\s*(?<body>.*)$"
+ },
+ "sq-brackets": {
+ "pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3,6})?)Z?\\]\\s*(?<body>.*)$"
+ }
+ },
+ "sample": [
+ {
+ "line": "Sat Apr 27 03:33:07 PDT 2013\nHello, World"
+ },
+ {
+ "line": "[2021-05-21T21:58:57.022497Z]"
+ }
+ ]
+ }
+} \ No newline at end of file