You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "kezhenxu94 (via GitHub)" <gi...@apache.org> on 2023/02/06 11:43:30 UTC

[GitHub] [skywalking-python] kezhenxu94 commented on a diff in pull request #276: Add loguru support

kezhenxu94 commented on code in PR #276:
URL: https://github.com/apache/skywalking-python/pull/276#discussion_r1097273703


##########
tests/plugin/data/sw_loguru/services/provider.py:
##########
@@ -24,21 +25,35 @@
 
     app = FastAPI()
 
+    logging_logger = logging.getLogger()
+
 
     @app.get('/users')
     async def application():
         time.sleep(0.5)
 
         try:
             raise Exception('Loguru Exception Test.')
-        except Exception:   # noqa
+        except Exception:  # noqa
             logger.opt(exception=True).error('Loguru provider error reported.')
+            time.sleep(0.5)
+            logging_logger.error('Logging provider error reported.', exc_info=True)
+
+        time.sleep(0.5)
 
+        # this will be filtered by SW_AGENT_LOG_REPORTER_LEVEL
         logger.debug('Loguru provider debug reported.')
 
+        time.sleep(0.5)
+
         logger.warning('Loguru provider warning reported.')
 
+        time.sleep(0.5)
+

Review Comment:
   Can we remove these `time.sleep`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org