PrashanthB461 commited on
Commit
69e63d4
·
verified ·
1 Parent(s): 0c7d9e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -18,6 +18,17 @@ import pickle
18
  import sqlite3
19
  from pathlib import Path
20
 
 
 
 
 
 
 
 
 
 
 
 
21
  # Third-Party Imports - with error handling
22
  try:
23
  import cv2
@@ -49,17 +60,6 @@ except ImportError as e:
49
 
50
  # --- CONFIGURATION ---
51
 
52
- # Setup logging with better formatting
53
- logging.basicConfig(
54
- level=logging.INFO,
55
- format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
56
- handlers=[
57
- logging.FileHandler("attendance_system.log"),
58
- logging.StreamHandler()
59
- ]
60
- )
61
- logger = logging.getLogger(__name__)
62
-
63
  # Load environment variables from .env file
64
  load_dotenv()
65
 
 
18
  import sqlite3
19
  from pathlib import Path
20
 
21
+ # Setup logging first before any other imports that might use it
22
+ logging.basicConfig(
23
+ level=logging.INFO,
24
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
25
+ handlers=[
26
+ logging.FileHandler("attendance_system.log"),
27
+ logging.StreamHandler()
28
+ ]
29
+ )
30
+ logger = logging.getLogger(__name__)
31
+
32
  # Third-Party Imports - with error handling
33
  try:
34
  import cv2
 
60
 
61
  # --- CONFIGURATION ---
62
 
 
 
 
 
 
 
 
 
 
 
 
63
  # Load environment variables from .env file
64
  load_dotenv()
65