chore: update logger

This commit is contained in:
Steven
2024-02-29 23:54:43 +08:00
parent 12f4d3a10d
commit dfa78cac49
14 changed files with 87 additions and 146 deletions

View File

@@ -1,11 +1,8 @@
package telegram
import (
"log/slog"
"path/filepath"
"go.uber.org/zap"
"github.com/usememos/memos/internal/log"
)
type Attachment struct {
@@ -29,9 +26,7 @@ func (b Attachment) GetMimeType() string {
mime, ok := mimeTypes[filepath.Ext(b.FileName)]
if !ok {
// Handle unknown file extension
log.Warn("Unknown file type for ", zap.String("filename", b.FileName))
slog.Warn("Unknown file extension", slog.String("file", b.FileName))
return "application/octet-stream"
}