eryajf / go-ldap-admin

🌉 基于Go+Vue实现的openLDAP后台管理项目
http://ldapdoc.eryajf.net
Apache License 2.0
1.53k stars 259 forks source link

🐛 一些问题。。。 | [Bug] 如何关闭SQL日志和操作日志 #265

Closed ylighgh closed 10 months ago

ylighgh commented 10 months ago

您使用的版本? | Your usage version?

v0.5.10 2023-04-25

您使用的场景? | Your usage scenarios?

LDAP密码重置

您做了什么操作? | What did you do?

您遇到了什么问题? | What are your problems?

  1. 配置文件中 mysql.log-mode为false时,标准输出中仍然能够看见sql执行的日志,如何关闭

  2. 我不希望将每次请求的url 记录 存入 operation_logs 表中,如何关闭该功能

您期望的结果是怎样的? | What is your expected outcome?

解决上面两个问题

eryajf commented 10 months ago

您好 @ylighgh👋,我已收到您的反馈,我将安排时间考虑您提交的信息并进行回复。-- 这条信息是由自动回复的机器人发出的。

Hello @ylighgh. I have received your feedback, and I will arrange time to consider the information you submitted and reply. -- This message is sent by an automatic reply robot.

ylighgh commented 10 months ago

image image

eryajf commented 10 months ago

这是个问题,我随后看看支持一下这个能力

ylighgh commented 10 months ago

image 我在初始化orm模型的暴力时候加了一个这个配置 Logger: logger.Default.LogMode(logger.Silent) 就不会显示sql在标准输出中了,但是数据库中的 opertaion_log 我还没有找到怎么关闭

ylighgh commented 10 months ago

image 因为是k8s容器部署,不希望每次k8s探针请求的时候都记录在数据库中的 operation_log 表中

eryajf commented 10 months ago

应该注释掉这句就好了:

https://github.com/eryajf/go-ldap-admin/blob/30c9a71d438acf0e178728561c03458848676b9e/routes/a_routes.go#L36

ylighgh commented 10 months ago

好的,问题已经解决,谢谢~

eryajf commented 10 months ago

如果有兴趣,也欢迎将这个功能点PR上来