Skip to content

Commit

Permalink
fix regex
Browse files Browse the repository at this point in the history
  • Loading branch information
duyguHsnHsn committed Nov 23, 2023
1 parent 4f95038 commit cca5524
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions projects/vdk-plugins/vdk-structlog/tests/test_structlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ def test_custom_console_format(log_format):


def _matches_custom_format(log):
# This example pattern is assuming a structure
# based on the format string "%(asctime)s %(name)-12s %(levelname)-8s %(message)s"
pattern = re.compile(r"\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} \S+ \[INFO ]")
pattern = re.compile(r"\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}\s+\S{1,12}\s+\S{1,8}")
return bool(pattern.search(log))


Expand Down

0 comments on commit cca5524

Please sign in to comment.