mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
* Change thumbnail resize algorithm and add size parameter * Height -> Width * Change default size from 100px to 200px * Height -> width
23 lines
458 B
Go
23 lines
458 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/stashapp/stash/pkg/logger"
|
|
"github.com/stashapp/stash/pkg/models"
|
|
)
|
|
|
|
func (r *queryResolver) Logs(ctx context.Context) ([]*models.LogEntry, error) {
|
|
logCache := logger.GetLogCache()
|
|
ret := make([]*models.LogEntry, len(logCache))
|
|
|
|
for i, entry := range logCache {
|
|
ret[i] = &models.LogEntry{
|
|
Time: entry.Time,
|
|
Level: getLogLevel(entry.Type),
|
|
Message: entry.Message,
|
|
}
|
|
}
|
|
|
|
return ret, nil
|
|
}
|