mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-17 17:04:22 +00:00
remove main function from logger
This commit is contained in:
parent
6ac1e0ca46
commit
eb95c12802
1 changed files with 0 additions and 15 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
|
@ -82,17 +81,3 @@ func GetLogger() *slog.Logger {
|
|||
logger := slog.New(h)
|
||||
return logger
|
||||
}
|
||||
|
||||
func main() {
|
||||
h := slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
|
||||
ReplaceAttr: replaceAttr,
|
||||
})
|
||||
|
||||
logger := slog.New(h)
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
err := xerrors.New("something happened")
|
||||
|
||||
logger.ErrorContext(ctx, "image uploaded", slog.Any("error", err))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue