Skip to content

Commit 4632529

Browse files
committed
feat: update logger name for accent_marker and improve log format
1 parent e8f3dd9 commit 4632529

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

api/accent_marker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
mark_furigana,
2323
)
2424

25-
logger = logging.getLogger(__name__)
25+
logger = logging.getLogger("api")
2626

2727
tags_metadata = [
2828
{

main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
5757

5858
logging.basicConfig(
5959
level=logging.INFO,
60-
format="%(asctime)s [%(levelname)s] [%(name)s:%(lineno)d] - %(message)s",
60+
format="{asctime} [{levelname:^8s}] {message} ({name}.{module}:{lineno})",
6161
datefmt="%Y-%m-%d %H:%M:%S",
62+
style="{",
6263
)

0 commit comments

Comments
 (0)