用户登录和接口鉴权

This commit is contained in:
2025-09-07 21:13:15 +08:00
parent c4522b974b
commit 565cf3fa6a
380 changed files with 18330 additions and 16854 deletions

View File

@@ -23,20 +23,20 @@ func NewLogger() *Logger {
// Info 记录信息级别日志
func (l *Logger) Info(message string) {
l.logger.Printf("[INFO] %s %s", time.Now().Format(time.RFC3339), message)
l.logger.Printf("[信息] %s %s", time.Now().Format(time.RFC3339), message)
}
// Error 记录错误级别日志
func (l *Logger) Error(message string) {
l.logger.Printf("[ERROR] %s %s", time.Now().Format(time.RFC3339), message)
l.logger.Printf("[错误] %s %s", time.Now().Format(time.RFC3339), message)
}
// Debug 记录调试级别日志
func (l *Logger) Debug(message string) {
l.logger.Printf("[DEBUG] %s %s", time.Now().Format(time.RFC3339), message)
l.logger.Printf("[调试] %s %s", time.Now().Format(time.RFC3339), message)
}
// Warn 记录警告级别日志
func (l *Logger) Warn(message string) {
l.logger.Printf("[WARN] %s %s", time.Now().Format(time.RFC3339), message)
l.logger.Printf("[警告] %s %s", time.Now().Format(time.RFC3339), message)
}