Skip to content

Commit

Permalink
[Small] Fixes logging (activeloopai#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhinavTuli authored Sep 13, 2021
1 parent 6588072 commit 2e0fa1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
os.environ["BUGGER_OFF"] = "true"

os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
logging.basicConfig(level=logging.ERROR)
logging.disable(logging.INFO)

from hub.constants import *
from hub.tests.common import SESSION_ID
Expand Down
8 changes: 8 additions & 0 deletions hub/client/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
import sys

logger = logging.getLogger("hub")


def configure_logger(debug=0):
log_level = logging.DEBUG if debug == 1 else logging.INFO
logging.basicConfig(format="%(message)s", level=log_level, stream=sys.stdout)


configure_logger(0)

0 comments on commit 2e0fa1d

Please sign in to comment.