Skip to content

Commit

Permalink
Remove unused SqliteError. Cache clearing log line should be debug, n…
Browse files Browse the repository at this point in the history
…ot info.
  • Loading branch information
ggreer committed Nov 21, 2024
1 parent a271c5b commit 3242eba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions pkg/uhttp/dbcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ type CacheRow struct {
Url string
}

// SqliteError implement sqlite error code.
type SqliteError struct {
Code int `json:"Code,omitempty"` /* The error code returned by SQLite */
ExtendedCode int `json:"ExtendedCode,omitempty"` /* The extended error code returned by SQLite */
err string
}

func (b *SqliteError) Error() string {
return b.err
}

const (
failStartTransaction = "Failed to start a transaction"
errQueryingTable = "Error querying cache table"
Expand Down
2 changes: 1 addition & 1 deletion pkg/uhttp/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func ClearCaches(ctx context.Context) error {
l.Debug("clearing caches")
var err error
for _, cache := range caches {
l.Info("clearing cache", zap.String("cache", fmt.Sprintf("%T", cache)), zap.Any("stats", cache.Stats(ctx)))
l.Debug("clearing cache", zap.String("cache", fmt.Sprintf("%T", cache)), zap.Any("stats", cache.Stats(ctx)))
err = cache.Clear(ctx)
if err != nil {
err = errors.Join(err, err)
Expand Down

0 comments on commit 3242eba

Please sign in to comment.