feat: preferred sessions are now external
This commit is contained in:
@@ -4,6 +4,20 @@ import traceback
|
||||
from crossfit_booker import CrossFitBooker
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Configure logging once at script startup
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG, # Change to DEBUG for more detailed logs
|
||||
format='%(asctime)s - %(levelname)s - %(message)s',
|
||||
handlers=[
|
||||
logging.FileHandler("log/crossfit_booking.log"),
|
||||
logging.StreamHandler()
|
||||
]
|
||||
)
|
||||
|
||||
logging.getLogger("requests").setLevel(logging.WARNING)
|
||||
logging.info("Logging enhanced with request library noise reduction")
|
||||
|
||||
# Start the main runner
|
||||
booker = CrossFitBooker()
|
||||
if not booker.login():
|
||||
logging.error("Failed to login - Traceback: %s", traceback.format_exc())
|
||||
|
||||
Reference in New Issue
Block a user