Skip to content

日志备份到Clickhouse#894

Open
liuhetian wants to merge 4 commits intoMartialBE:mainfrom
liuhetian:clickhouse
Open

日志备份到Clickhouse#894
liuhetian wants to merge 4 commits intoMartialBE:mainfrom
liuhetian:clickhouse

Conversation

@liuhetian
Copy link
Contributor

close #886

#886 里面做了日志批量插入,但是还是不能很好的解决问题,原因有:

  1. 现在的做法里,消费日志和系统日志写在一起,这感觉比较迷惑,字段都完全不一样,
  2. 实际场景中日志会定期删除,现在mysql的log表没有日期分区字段,删除起来会卡

所以最好能够允许提供一个专门写日志的表,这样一来如果量真的特别特别大,可以放弃mysql写入,改为clickhouse

@vercel
Copy link

vercel bot commented Jan 3, 2026

@liuhetian is attempting to deploy a commit to the martialbe's projects Team on Vercel.

A member of the Team first needs to authorize it.

@liuhetian
Copy link
Contributor Author

image

如果不想要日志:关闭日志
如果想要日志:写入默认数据库,可以在网页前端里看到日志和进行一些基础分析
如果数据量很大并且需要日志分析:不写入默认数据库,备份到clickhouse,然后自己想办法分析

@ZeroDeng01
Copy link
Collaborator

这里配置应该都在环境变量而不是ui上控制这类运行相关基础设置信息!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants