File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 1+ [loggers]
2+ keys=root
3+
4+ [handlers]
5+ keys=stream_handler
6+
7+ [formatters]
8+ keys=formatter
9+
10+ [logger_root]
11+ level=DEBUG
12+ handlers=stream_handler
13+
14+ [handler_stream_handler]
15+ class=StreamHandler
16+ level=INFO
17+ formatter=formatter
18+ args=(sys.stderr,)
19+
20+ [formatter_formatter]
21+ format=[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s
Original file line number Diff line number Diff line change 2424from typing import Union , Annotated
2525import importlib .metadata
2626import logging
27+ import logging .config
2728import os
2829import re
2930import tempfile
4041from .util import apierror
4142from .worker import transcribe , detect_language as detect_language_task
4243
43- logging .basicConfig ( format = '[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s' , level = logging .INFO , force = True )
44+ logging .config . fileConfig ( 'app/ logging.conf' )
4445logger = logging .getLogger (__name__ )
4546
4647APP_ENV = os .getenv ("APP_ENV" , "production" )
Original file line number Diff line number Diff line change 11import logging
2+ import logging .config
23import os
34from io import StringIO
45from threading import Lock
910import json
1011from .constants import ASR_ENGINE_OPTIONS
1112
12- logging .basicConfig ( format = '[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s' , level = logging .INFO , force = True )
13+ logging .config . fileConfig ( 'app/ logging.conf' )
1314logger = logging .getLogger (__name__ )
1415
1516model_name = os .getenv ("ASR_MODEL" , "small" )
Original file line number Diff line number Diff line change 11import logging
2+ import logging .config
23import os
34
45from celery import Celery
89
910from .util .audio import load_audio
1011
11- logging .basicConfig ( format = '[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s' , level = logging .INFO , force = True )
12+ logging .config . fileConfig ( 'app/ logging.conf' )
1213logger = logging .getLogger (__name__ )
1314
1415# monkeypatch tqdm to fool whisper's `transcribe` function
You can’t perform that action at this time.
0 commit comments