Skip to content

Commit

Permalink
Ensure use string as log-level, even for logging.XXX (#2745)
Browse files Browse the repository at this point in the history
Fixes #2567

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
  • Loading branch information
sighingnow committed May 25, 2023
1 parent e969d0e commit e6af69b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/graphscope/client/session.py
Expand Up @@ -1370,6 +1370,12 @@ def set_option(**kwargs):
if k == "vineyard_shared_mem":
setattr("_local_vineyard_shared_mem", v)

# use string as log level
if k == "log_level" and isinstance(v, int):
level = logging.getLevelName(v)
if " " not in level: # invalid number will returns "Level xxx"
setattr(gs_config, k, level.upper())

GSLogger.update()


Expand Down

0 comments on commit e6af69b

Please sign in to comment.