Skip to content

Commit 1cc7db2

Browse files
committed
Respect LOGLEVEL env var in octokit.py
1 parent 7d49b7b commit 1cc7db2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ghastoolkit/octokit/octokit.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
# logger
2626
logger = logging.getLogger("ghastoolkit.octokit")
27+
LOGLEVEL = os.environ.get("LOGLEVEL", "INFO").upper()
28+
if isinstance(logging.getLevelName(LOGLEVEL), int):
29+
logging.basicConfig(level=LOGLEVEL)
2730

2831

2932
class Octokit:

0 commit comments

Comments
 (0)