Rocket's logger was the only one, so messages from the daemons depended on it having launched, and most messages bypassed logging with println!. - Install env_logger at startup: level from log.level (LOG_LEVEL), with RUST_LOG overriding it. Rocket's per-request logs and sqlx's Postgres notices are kept to warnings. - Under systemd, prefix lines with their syslog priority so journald records levels (journalctl -p warning works). - Replace every println! with a log macro at a fitting level. - Recurring failures are a warning when they start or change, debug while they repeat, and an info message when they recover. - Listenbrainz errors are readable: an unknown user is "Listenbrainz user "x" doesn't exist" rather than a JSON decode error, and a period without stats yet (204) leaves the playlist alone instead of failing to decode. The UI's Refresh shows the same messages. - Warnings name the playlist or rule they're about. - Songs missing from the library are debug output, not errors every tick. - Daemons no longer run twice at startup (interval's first tick is immediate), and a failing playlist rule or daemon is logged instead of panicking the task. - Subsonic errors display as messages rather than Debug output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018opPJMJjLWr4RqdG6vuK6p
42 lines
1.2 KiB
TOML
42 lines
1.2 KiB
TOML
[package]
|
|
name = "playlistd"
|
|
version = "0.2.6"
|
|
edition = "2021"
|
|
authors = ["Jude Southworth (judesouthworth@pm.me)"]
|
|
license = "AGPL-3.0 only"
|
|
description = "Subsonic playlist daemon"
|
|
|
|
[dependencies]
|
|
rocket = { version = "0.5.0", features = ["json"] }
|
|
tokio = { version = "1.0", features = ["full"] }
|
|
sqlx = { version = "0.8.6", features = ["runtime-tokio", "postgres", "uuid", "chrono"] }
|
|
reqwest = { version = "0.11", features = ["json", "stream"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
uuid = { version = "1.7", features = ["v4", "serde"] }
|
|
md5 = "0.8.0"
|
|
thiserror = "2.0.17"
|
|
config = "0.15.19"
|
|
log = "0.4.21"
|
|
env_logger = "0.11"
|
|
chrono = { version = "0.4.38", features = ["serde"] }
|
|
rand = "0.8"
|
|
serde_json = "1.0"
|
|
futures-util = "0.3"
|
|
tokio-util = { version = "0.7", features = ["io"] }
|
|
|
|
[package.metadata.deb]
|
|
depends = "$auto"
|
|
assets = [
|
|
["target/release/playlistd", "usr/bin/playlistd", "755"],
|
|
["etc/playlistd/playlistd.toml", "etc/playlistd/playlistd.toml", "600"],
|
|
["etc/playlistd/Rocket.toml", "etc/playlistd/Rocket.toml", "600"],
|
|
]
|
|
conf-files = [
|
|
"/etc/playlistd/playlistd.toml",
|
|
"/etc/playlistd/Rocket.toml",
|
|
]
|
|
|
|
[package.metadata.deb.systemd-units]
|
|
unit-scripts = "systemd"
|
|
start = false
|