Repository: jina-ai/serve
Pull request: fix(logging): fix success level message

Problem statement:
success level bug doesn't work well
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
when I set `ERROR` as logging level, the `SUCCESS` level message still appeared. 
**Describe how you solve it**
<!-- copy past your code/pull request link -->

---

<!-- Optional, but really help us locate the problem faster -->

**Environment**
<!-- Run `jina --version-full` and copy paste the output here -->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->

Hints from issue discussion:

Commit message: fix(logging): fix success level message

Patch to review:
diff --git a/jina/logging/base.py b/jina/logging/base.py
index e58d1e4bbd0d1..0d17493c79cd7 100644
--- a/jina/logging/base.py
+++ b/jina/logging/base.py
@@ -112,7 +112,7 @@ def info(self, msg: str, **kwargs):
             sys.stdout.write('I:%s:%s' % (self.context, self._planify(msg)))
 
     def critical(self, msg: str, **kwargs):
-        """log info-level message"""
+        """log critical-level message"""
         if self.log_level <= LogVerbosity.CRITICAL:
             sys.stdout.write('C:%s:%s' % (self.context, self._planify(msg)))
 
@@ -132,7 +132,7 @@ def warning(self, msg: str, **kwargs):
             sys.stdout.write('W:%s:%s' % (self.context, self._planify(msg)))
 
     def success(self, msg: str, **kwargs):
-        """log warn-level message"""
+        """log success-level message"""
         if self.log_level <= LogVerbosity.SUCCESS:
             sys.stdout.write('W:%s:%s' % (self.context, self._planify(msg)))
 
@@ -224,8 +224,8 @@ def get_logger(context: str, context_len: int = 15,
     console_handler.setFormatter(ColorFormatter(fmt_str))
     logger.addHandler(console_handler)
 
-    logging.SUCCESS = 25  # between WARNING and INFO
-    logging.addLevelName(logging.SUCCESS, 'SUCCESS')
-    setattr(logger, 'success', lambda message, *args: logger._log(logging.SUCCESS, message, args))
+    success_level = 25  # between WARNING and INFO
+    logging.addLevelName(success_level, 'SUCCESS')
+    setattr(logger, 'success', lambda message: logger.log(success_level, message))
 
     return logger


Code review comments:
diff_hunk: @@ -224,8 +224,8 @@ def get_logger(context: str, context_len: int = 15,
     console_handler.setFormatter(ColorFormatter(fmt_str))
     logger.addHandler(console_handler)
 
-    logging.SUCCESS = 25  # between WARNING and INFO
-    logging.addLevelName(logging.SUCCESS, 'SUCCESS')
-    setattr(logger, 'success', lambda message, *args: logger._log(logging.SUCCESS, message, args))
+    success_level = 25  # between WARNING and INFO
path: jina/logging/base.py
text: @user1:
```suggestion
    success_level = LogVerbosity.SUCCESS.value  # between WARNING and INFO
```