mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add logs to Logs page (#151)
* Add websocket connection * Add logs to the log page * Make debug color more readable * Remove TODO from front page * Put all log entries in latest first order * Add filtering of log entries by level * Limit log entries and throttle updates * Fix logger not throttling broadcasts * Remove now unnecessary UI-side log throttling * Filter incoming logs by log level * Make log view more terminal-like
This commit is contained in:
5
graphql/documents/data/log.graphql
Normal file
5
graphql/documents/data/log.graphql
Normal file
@@ -0,0 +1,5 @@
|
||||
fragment LogEntryData on LogEntry {
|
||||
time
|
||||
level
|
||||
message
|
||||
}
|
||||
@@ -54,6 +54,11 @@ query Stats {
|
||||
}
|
||||
}
|
||||
|
||||
query Logs {
|
||||
logs {
|
||||
...LogEntryData
|
||||
}
|
||||
}
|
||||
query Version {
|
||||
version {
|
||||
hash,
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
subscription MetadataUpdate {
|
||||
metadataUpdate
|
||||
}
|
||||
|
||||
subscription LoggingSubscribe {
|
||||
loggingSubscribe {
|
||||
...LogEntryData
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,8 @@ type Query {
|
||||
"""Organize scene markers by tag for a given scene ID"""
|
||||
sceneMarkerTags(scene_id: ID!): [SceneMarkerTag!]!
|
||||
|
||||
logs: [LogEntry!]!
|
||||
|
||||
# Scrapers
|
||||
|
||||
"""Scrape a performer using Freeones"""
|
||||
@@ -101,6 +103,8 @@ type Mutation {
|
||||
type Subscription {
|
||||
"""Update from the metadata manager"""
|
||||
metadataUpdate: String!
|
||||
|
||||
loggingSubscribe: [LogEntry!]!
|
||||
}
|
||||
|
||||
schema {
|
||||
|
||||
16
graphql/schema/types/logging.graphql
Normal file
16
graphql/schema/types/logging.graphql
Normal file
@@ -0,0 +1,16 @@
|
||||
"""Log entries"""
|
||||
scalar Time
|
||||
|
||||
enum LogLevel {
|
||||
Debug
|
||||
Info
|
||||
Progress
|
||||
Warning
|
||||
Error
|
||||
}
|
||||
|
||||
type LogEntry {
|
||||
time: Time!
|
||||
level: LogLevel!
|
||||
message: String!
|
||||
}
|
||||
Reference in New Issue
Block a user