square-authentication 10.0.1__py3-none-any.whl → 10.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,6 +93,12 @@ try:
93
93
  config_int_square_file_store_port = int(
94
94
  ldict_configuration["SQUARE_FILE_STORE_HELPER"]["SQUARE_FILE_STORE_PORT"]
95
95
  )
96
+ config_formatter_choice = ldict_configuration["SQUARE_LOGGER"]["FORMATTER_CHOICE"]
97
+ if config_formatter_choice not in ("human_readable", "json"):
98
+ raise ValueError(f"Invalid formatter choice: {config_formatter_choice}")
99
+ config_bool_enable_redaction = eval(
100
+ ldict_configuration["SQUARE_LOGGER"]["ENABLE_REDACTION"]
101
+ )
96
102
  # ===========================================
97
103
 
98
104
  # ===========================================
@@ -143,10 +149,12 @@ try:
143
149
 
144
150
  # Initialize logger
145
151
  global_object_square_logger = SquareLogger(
146
- pstr_log_file_name=config_str_log_file_name,
147
- pint_log_level=config_int_log_level,
148
- pstr_log_path=config_str_log_path,
149
- pint_log_backup_count=config_int_log_backup_count,
152
+ log_file_name=config_str_log_file_name,
153
+ log_level=config_int_log_level,
154
+ log_path=config_str_log_path,
155
+ log_backup_count=config_int_log_backup_count,
156
+ formatter_choice=config_formatter_choice,
157
+ enable_redaction=config_bool_enable_redaction,
150
158
  )
151
159
  global_object_square_database_helper = SquareDatabaseHelper(
152
160
  param_str_square_database_ip=config_str_square_database_ip,
@@ -40,6 +40,9 @@ LOG_PATH = logs
40
40
  # number of backup log files to keep during rotation
41
41
  # if backupCount is zero, rollover never occurs.
42
42
  LOG_BACKUP_COUNT = 3
43
+ # json or human_readable
44
+ FORMATTER_CHOICE = json
45
+ ENABLE_REDACTION = True
43
46
 
44
47
  [SQUARE_DATABASE_HELPER]
45
48
 
@@ -40,6 +40,9 @@ LOG_PATH = logs
40
40
  # number of backup log files to keep during rotation
41
41
  # if backupCount is zero, rollover never occurs.
42
42
  LOG_BACKUP_COUNT = 3
43
+ # json or human_readable
44
+ FORMATTER_CHOICE = json
45
+ ENABLE_REDACTION = True
43
46
 
44
47
  [SQUARE_DATABASE_HELPER]
45
48