Skip to content

Commit

Permalink
feat: 将日志统一存储到 logs 数据库中
Browse files Browse the repository at this point in the history
  • Loading branch information
FHU-yezi committed Oct 15, 2024
1 parent 2aad4c6 commit c55b208
Show file tree
Hide file tree
Showing 4 changed files with 243 additions and 207 deletions.
1 change: 1 addition & 0 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
[logging]
display_level = "DEBUG"
save_level = "DEBUG"
table = "jfetcher"

[notify]
enabled = true
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"jkit>=3.0.0a16",
"prefect<3.0.0",
"psycopg[binary]>=3.2.0",
"sshared[config,mongo,postgres]>=0.11.0",
"sshared[config,mongo,postgres]>=0.14.0",
]

[tool.uv]
Expand Down
3 changes: 2 additions & 1 deletion utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
logger = Logger(
display_level=CONFIG.logging.display_level,
save_level=CONFIG.logging.save_level,
connection_string=CONFIG.postgres.connection_string
connection_string=CONFIG.postgres.logging_connection_string,
table=CONFIG.logging.table,
)


Expand Down
Loading

0 comments on commit c55b208

Please sign in to comment.