mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
made logging better to avoid messing up the
progress bar
This commit is contained in:
@ -1,9 +1,21 @@
|
||||
import os
|
||||
import os, logging
|
||||
from datetime import datetime
|
||||
import pandas as pd
|
||||
import tqdm
|
||||
from github import Github
|
||||
|
||||
# Set up logging
|
||||
log_file = "github_api.log"
|
||||
logging.basicConfig(
|
||||
filename=log_file,
|
||||
level=logging.WARNING, # Adjust as needed
|
||||
format="%(asctime)s - %(levelname)s - %(message)s",
|
||||
datefmt="%Y-%m-%d %H:%M:%S"
|
||||
)
|
||||
|
||||
# Redirect PyGithub logging
|
||||
logging.getLogger("github.Requester").setLevel(logging.WARNING)
|
||||
|
||||
# Initialize GitHub API client
|
||||
g = Github(os.environ["GITHUB_AUTH_TOKEN_CRAB"])
|
||||
|
||||
|
Reference in New Issue
Block a user