ALYYAN commited on
Commit
3f74254
·
verified ·
1 Parent(s): 11ad9da

Update src/cnnClassifier/__init__.py

Browse files
Files changed (1) hide show
  1. src/cnnClassifier/__init__.py +3 -12
src/cnnClassifier/__init__.py CHANGED
@@ -1,26 +1,17 @@
1
- import os
2
  import sys
3
  import logging
4
 
5
  # Define the logging format
6
  logging_str = "[%(asctime)s: %(levelname)s: %(module)s: %(message)s]"
7
 
8
- # Define the directory for log files
9
- log_dir = "logs"
10
- log_filepath = os.path.join(log_dir,"running_logs.log")
11
- os.makedirs(log_dir, exist_ok=True)
12
-
13
-
14
- # Configure the logging
15
  logging.basicConfig(
16
  level= logging.INFO,
17
  format= logging_str,
18
-
19
  handlers=[
20
- logging.FileHandler(log_filepath), # Log to a file
21
- logging.StreamHandler(sys.stdout) # Also print to the console
22
  ]
23
  )
24
 
25
- # Create the logger object
26
  logger = logging.getLogger("cnnClassifierLogger")
 
 
1
  import sys
2
  import logging
3
 
4
  # Define the logging format
5
  logging_str = "[%(asctime)s: %(levelname)s: %(module)s: %(message)s]"
6
 
7
+ # Configure logging to print ONLY to the console (stdout)
 
 
 
 
 
 
8
  logging.basicConfig(
9
  level= logging.INFO,
10
  format= logging_str,
 
11
  handlers=[
12
+ logging.StreamHandler(sys.stdout)
 
13
  ]
14
  )
15
 
16
+ # Create the logger object that the rest of the application can import
17
  logger = logging.getLogger("cnnClassifierLogger")