|
|
@@ -1,20 +1,13 @@
|
|
|
import csv
|
|
|
import chardet
|
|
|
-import logging
|
|
|
import sys
|
|
|
from pathlib import Path
|
|
|
from ai_trans import translate_sentences
|
|
|
from brand_add_url_link import create_hyperlink
|
|
|
+from mylib.logging_config import setup_logging
|
|
|
|
|
|
-# Configure logging
|
|
|
-logging.basicConfig(
|
|
|
- level=logging.INFO,
|
|
|
- format='%(asctime)s - %(levelname)s - %(message)s',
|
|
|
- handlers=[
|
|
|
- logging.FileHandler('process_data.log'),
|
|
|
- logging.StreamHandler()
|
|
|
- ]
|
|
|
-)
|
|
|
+# Setup custom logging
|
|
|
+setup_logging()
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def detect_encoding(file_path):
|