Add logging to storage package

This commit is contained in:
2024-12-16 22:38:21 +01:00
parent 03e78c3e6b
commit 032ae1354c
5 changed files with 177 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ package storage
import (
"io/fs"
"novamd/internal/logging"
"os"
)
@@ -17,6 +18,15 @@ type fileSystem interface {
IsNotExist(err error) bool
}
var logger logging.Logger
func getLogger() logging.Logger {
if logger == nil {
logger = logging.WithGroup("storage")
}
return logger
}
// osFS implements the FileSystem interface using the real filesystem.
type osFS struct{}