nebius/SWE-bench-extra huggingface dataset:
Repository: diogommartins/simple_json_logger

Issue:
Fix multiline log for stacktraces
Multiline stack traces must be formatted as a list of strings

Comments:

Patch:
diff --git a/setup.py b/setup.py
index a1dddaa..db14acc 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 
-VERSION = '0.2.2'
+VERSION = '0.2.3'
 
 
 setup(name='simple_json_logger',
diff --git a/simple_json_logger/formatter.py b/simple_json_logger/formatter.py
index b4eb58a..629eecb 100644
--- a/simple_json_logger/formatter.py
+++ b/simple_json_logger/formatter.py
@@ -1,7 +1,7 @@
 import logging
 try:
     from logging import _levelToName
-except ImportError:
+except ImportError:  # pragma: no cover
     from logging import _levelNames as _levelToName
 
 import traceback
@@ -32,7 +32,7 @@ class JsonFormatter(logging.Formatter):
             return obj.strftime(DATETIME_FORMAT)
         elif istraceback(obj):
             tb = ''.join(traceback.format_tb(obj))
-            return tb.strip()
+            return tb.strip().split('\n')
         elif isinstance(obj, Exception):
             return "Exception: %s" % str(obj)
         elif callable(obj):


Test patch:
diff --git a/tests/test_logger.py b/tests/test_logger.py
index a98e7f4..8094814 100644
--- a/tests/test_logger.py
+++ b/tests/test_logger.py
@@ -78,12 +78,11 @@ class LoggerTests(unittest.TestCase):
         json_log = json.loads(logged_content)
 
         exc_class, exc_message, exc_traceback = json_log['exc_info']
-        self.assertIn(member=exception_message,
-                      container=exc_message)
+        self.assertEqual('Exception: {}'.format(exception_message), exc_message)
 
         current_func_name = inspect.currentframe().f_code.co_name
-        self.assertIn(member=current_func_name,
-                      container=exc_traceback)
+        self.assertIn(current_func_name, exc_traceback[0])
+        self.assertIn('raise Exception(exception_message)', exc_traceback[1])
 
     def test_it_logs_datetime_objects(self):
         message = {