From 58e74e6caad801ae162e79f19a16e74e6a2da55b Mon Sep 17 00:00:00 2001
From: George Ohashi <george@neuralmagic.com>
Date: Fri, 26 Jan 2024 21:05:02 +0000
Subject: [PATCH] doc string typo and change default to re:.*

---
 src/deepsparse/loggers/config.py          | 2 +-
 src/deepsparse/loggers/filters/pattern.py | 5 ++++-
 tests/deepsparse/loggers/test_config.py   | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/deepsparse/loggers/config.py b/src/deepsparse/loggers/config.py
index 109d903b59..4f7b4ee7ce 100644
--- a/src/deepsparse/loggers/config.py
+++ b/src/deepsparse/loggers/config.py
@@ -69,7 +69,7 @@ class LoggingConfig(BaseModel):
     )
 
     system: Dict[str, List[TargetConfig]] = Field(
-        default={".*": [TargetConfig()]},
+        default={"re:.*": [TargetConfig()]},
         description="Default python logging module logger",
     )
 
diff --git a/src/deepsparse/loggers/filters/pattern.py b/src/deepsparse/loggers/filters/pattern.py
index 213b152463..0211bbcc75 100644
--- a/src/deepsparse/loggers/filters/pattern.py
+++ b/src/deepsparse/loggers/filters/pattern.py
@@ -44,9 +44,12 @@ def is_match_found(
     :return: bool: True if a match is found, False otherwise.
 
     Examples:
-        >>> is_match_found("apple", "apple pie")
+        >>> is_match_found("apple", "apple")
         True
 
+        >>> is_match_found("apple", "apple pie")
+        False
+
         >>> is_match_found("cherry", "apple pie")
         False
 
diff --git a/tests/deepsparse/loggers/test_config.py b/tests/deepsparse/loggers/test_config.py
index 3a63958127..a75e4e9a07 100644
--- a/tests/deepsparse/loggers/test_config.py
+++ b/tests/deepsparse/loggers/test_config.py
@@ -26,7 +26,7 @@ def test_config_generates_default_json():
         name: PythonLogger
         handler: null # None in python
     system:
-      ".*":
+      "re:.*":
       - func: identity
         freq: 1
         uses: