File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed
Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1313 layout = "wide" ,
1414 initial_sidebar_state = "expanded" ,
1515)
16- pg .run ()
17- print ("Current Environment:" , Config .ENVIRONMENT )
18- Config .print_config ()
16+
17+ Config .print_config_partial ()
18+
19+ pg .run ()
Original file line number Diff line number Diff line change 11"""Configuration module for ClipABit Streamlit frontend."""
22
33import os
4+ import logging
5+ import sys
6+
7+ logging .basicConfig (
8+ format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' ,
9+ level = logging .INFO ,
10+ handlers = [logging .StreamHandler (sys .stdout )]
11+ )
12+ logger = logging .getLogger (__name__ )
13+
414
515class Config :
616 """Configuration class for environment-based settings."""
@@ -41,9 +51,19 @@ def get_config(cls):
4151 }
4252
4353 @classmethod
44- def print_config (cls ):
54+ def print_config_partial (cls ):
55+ """Print current configuration for debugging."""
56+ config = cls .get_config ()
57+ logger .info ("Current Configuration:" )
58+ logger .info (f" Environment: { config ['environment' ]} " )
59+ logger .info (f" App Name: { config ['app_name' ]} " )
60+ logger .info (f" Namespace: { config ['namespace' ]} " )
61+
62+
63+ @classmethod
64+ def print_config_full (cls ):
4565 """Print current configuration for debugging."""
4666 config = cls .get_config ()
47- print ("Current Configuration:" )
67+ logger . info ("Current Configuration:" )
4868 for key , value in config .items ():
49- print (f" { key } : { value } " )
69+ logger . info (f" { key } : { value } " )
You can’t perform that action at this time.
0 commit comments