Regular Expressions 101

Community Patterns

LNAV Format for Salt Log File

1

Regular Expression
Python

r"
(?:(?P<timestamp>\d{4}-\d{2}-\d{2}[\s\t]+\d{2}\:\d{2}\:\d{2}\,\d{3})\s*(?P<name>\[[\w\.]+[\s]*\:\d+[\s]*\])\s*(?P<level>\[[A-Z]+[\s]*\])\s*(?P<process_id>\[\d+\])\s*(?P<body>.*$))
"

Description

Beginnings of defining a log format for Salt to use within LNAV. https://docs.lnav.org/en/latest/formats.html

Submitted by anonymous - 6 months ago (Last modified 6 months ago)