deps: replace tracing with log+env_logger, drop console-subscriber

Switch all tracing::{info,warn,error} to log::{info,warn,error}.
Replace tracing_subscriber::fmt::init() with env_logger::init().
Drop tracing, tracing-subscriber, tracing-appender as direct deps.
Drop console feature from jobkit (was pulling in console-subscriber
which pulled in tracing-subscriber).

tracing still compiled as transitive dep of reqwest and tui-markdown,
but our code no longer depends on it.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-04-05 06:54:11 -04:00
parent 917960cb76
commit 93bc49959c
19 changed files with 157 additions and 526 deletions

612
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -35,8 +35,8 @@ memmap2 = "0.9"
rayon = "1" rayon = "1"
peg = "0.8" peg = "0.8"
paste = "1" paste = "1"
jobkit = { git = "https://evilpiepirate.org/git/jobkit.git", features = ["daemon", "console"] } jobkit = { git = "https://evilpiepirate.org/git/jobkit.git", features = ["daemon"] }
tokio = { version = "1", features = ["full", "tracing"] } tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] } reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] }
glob = "0.3" glob = "0.3"
anyhow = "1" anyhow = "1"
@ -55,9 +55,7 @@ skillratings = "0.28"
capnp-rpc = "0.20" capnp-rpc = "0.20"
tokio-util = { version = "0.7", features = ["compat"] } tokio-util = { version = "0.7", features = ["compat"] }
toml = "0.8" toml = "0.8"
tracing = { version = "0.1", default-features = false } env_logger = "0.11"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2"
tokio-scoped = "0.2.0" tokio-scoped = "0.2.0"
[build-dependencies] [build-dependencies]

View file

@ -15,6 +15,6 @@ serde = { version = "1", features = ["derive"] }
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
tokio-rustls = "0.26" tokio-rustls = "0.26"
tokio-util = { version = "0.7", features = ["compat"] } tokio-util = { version = "0.7", features = ["compat"] }
tracing = { version = "0.1", default-features = false } log = "0.4"
tracing-subscriber = { version = "0.3", features = ["env-filter"] } env_logger = "0.11"
webpki-roots = "1" webpki-roots = "1"

View file

@ -24,7 +24,7 @@ use futures::AsyncReadExt;
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader}; use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader};
use tokio::net::UnixListener; use tokio::net::UnixListener;
use tokio_util::compat::TokioAsyncReadCompatExt; use tokio_util::compat::TokioAsyncReadCompatExt;
use tracing::{error, info, warn}; use log::{info, warn, error};
use poc_memory::channel_capnp::{channel_client, channel_server}; use poc_memory::channel_capnp::{channel_client, channel_server};
@ -609,7 +609,7 @@ fn channel_to_target(channel: &str) -> String {
#[tokio::main(flavor = "current_thread")] #[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init(); env_logger::init();
let config = load_config(); let config = load_config();
let state = Rc::new(RefCell::new(State::new(config))); let state = Rc::new(RefCell::new(State::new(config)));

View file

@ -11,5 +11,5 @@ futures = "0.3"
poc-memory = { path = "../.." } poc-memory = { path = "../.." }
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["compat"] } tokio-util = { version = "0.7", features = ["compat"] }
tracing = { version = "0.1", default-features = false } log = "0.4"
tracing-subscriber = { version = "0.3", features = ["env-filter"] } env_logger = "0.11"

View file

@ -17,7 +17,7 @@ use futures::AsyncReadExt;
use tokio::io::{AsyncBufReadExt, AsyncWriteExt}; use tokio::io::{AsyncBufReadExt, AsyncWriteExt};
use tokio::net::{TcpStream, UnixListener, UnixStream}; use tokio::net::{TcpStream, UnixListener, UnixStream};
use tokio_util::compat::TokioAsyncReadCompatExt; use tokio_util::compat::TokioAsyncReadCompatExt;
use tracing::{error, info, warn}; use log::{info, warn, error};
use poc_memory::channel_capnp::{channel_client, channel_server}; use poc_memory::channel_capnp::{channel_client, channel_server};
use poc_memory::thalamus::channel_log::ChannelLog; use poc_memory::thalamus::channel_log::ChannelLog;
@ -256,7 +256,7 @@ impl channel_server::Server for ChannelServerImpl {
#[tokio::main(flavor = "current_thread")] #[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init(); env_logger::init();
let dir = dirs::home_dir() let dir = dirs::home_dir()
.unwrap_or_default() .unwrap_or_default()

View file

@ -14,5 +14,5 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["compat"] } tokio-util = { version = "0.7", features = ["compat"] }
tracing = { version = "0.1", default-features = false } log = "0.4"
tracing-subscriber = { version = "0.3", features = ["env-filter"] } env_logger = "0.11"

View file

@ -17,7 +17,7 @@ use capnp_rpc::{pry, rpc_twoparty_capnp, twoparty, RpcSystem};
use futures::AsyncReadExt; use futures::AsyncReadExt;
use tokio::net::UnixListener; use tokio::net::UnixListener;
use tokio_util::compat::TokioAsyncReadCompatExt; use tokio_util::compat::TokioAsyncReadCompatExt;
use tracing::{error, info}; use log::{info, warn, error};
use poc_memory::channel_capnp::{channel_client, channel_server}; use poc_memory::channel_capnp::{channel_client, channel_server};
@ -309,7 +309,7 @@ impl channel_server::Server for ChannelServerImpl {
#[tokio::main(flavor = "current_thread")] #[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init(); env_logger::init();
let config = load_config(); let config = load_config();
let state = Rc::new(RefCell::new(State::new(config))); let state = Rc::new(RefCell::new(State::new(config)));

View file

@ -15,5 +15,5 @@ poc-memory = { path = "../.." }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["compat"] } tokio-util = { version = "0.7", features = ["compat"] }
tracing = { version = "0.1", default-features = false } log = "0.4"
tracing-subscriber = { version = "0.3", features = ["env-filter"] } env_logger = "0.11"

View file

@ -18,7 +18,7 @@ use futures::AsyncReadExt;
use tokio::io::AsyncBufReadExt; use tokio::io::AsyncBufReadExt;
use tokio::net::UnixListener; use tokio::net::UnixListener;
use tokio_util::compat::TokioAsyncReadCompatExt; use tokio_util::compat::TokioAsyncReadCompatExt;
use tracing::{error, info, warn}; use log::{info, warn, error};
use poc_memory::channel_capnp::{channel_client, channel_server}; use poc_memory::channel_capnp::{channel_client, channel_server};
use poc_memory::thalamus::channel_log::ChannelLog; use poc_memory::thalamus::channel_log::ChannelLog;
@ -337,7 +337,7 @@ fn cleanup_pipes(config: &Config) {
#[tokio::main] #[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init(); env_logger::init();
let config = load_config(); let config = load_config();
let state = Rc::new(RefCell::new(State::new(&config))); let state = Rc::new(RefCell::new(State::new(&config)));

View file

@ -77,7 +77,7 @@ impl Config {
let path = config_path(); let path = config_path();
match fs::read_to_string(&path) { match fs::read_to_string(&path) {
Ok(data) => toml::from_str(&data).unwrap_or_else(|e| { Ok(data) => toml::from_str(&data).unwrap_or_else(|e| {
tracing::warn!("bad config {}: {e}, using defaults", path.display()); log::warn!("bad config {}: {e}, using defaults", path.display());
Self::default() Self::default()
}), }),
Err(_) => { Err(_) => {

View file

@ -6,7 +6,7 @@
use super::{context, tmux}; use super::{context, tmux};
use crate::thalamus::{home, now, notify, idle as thalamus_idle}; use crate::thalamus::{home, now, notify, idle as thalamus_idle};
use tracing::info; use log::info;
/// Claude Code idle state — wraps the universal state machine. /// Claude Code idle state — wraps the universal state machine.
pub struct State { pub struct State {

View file

@ -22,7 +22,7 @@ use capnp_rpc::{rpc_twoparty_capnp, twoparty, RpcSystem};
use clap::{Parser, Subcommand}; use clap::{Parser, Subcommand};
use futures::AsyncReadExt; use futures::AsyncReadExt;
use tokio::net::UnixListener; use tokio::net::UnixListener;
use tracing::{error, info}; use log::{error, info};
use crate::thalamus::{daemon_capnp, home, now, notify}; use crate::thalamus::{daemon_capnp, home, now, notify};
@ -435,18 +435,7 @@ async fn module_command(
// -- Server mode ---------------------------------------------------------- // -- Server mode ----------------------------------------------------------
async fn server_main() -> Result<(), Box<dyn std::error::Error>> { async fn server_main() -> Result<(), Box<dyn std::error::Error>> {
let log_path = home().join(".consciousness/logs/daemon.log"); env_logger::init();
let file_appender = tracing_appender::rolling::daily(
log_path.parent().unwrap(),
"daemon.log",
);
tracing_subscriber::fmt()
.with_writer(file_appender)
.with_ansi(false)
.with_target(false)
.with_level(false)
.with_timer(tracing_subscriber::fmt::time::time())
.init();
let sock = sock_path(); let sock = sock_path();
let _ = std::fs::remove_file(&sock); let _ = std::fs::remove_file(&sock);

View file

@ -11,7 +11,7 @@ use daemon_capnp::daemon;
use capnp::capability::Promise; use capnp::capability::Promise;
use std::cell::RefCell; use std::cell::RefCell;
use std::rc::Rc; use std::rc::Rc;
use tracing::info; use log::info;
pub struct DaemonImpl { pub struct DaemonImpl {
state: Rc<RefCell<idle::State>>, state: Rc<RefCell<idle::State>>,

View file

@ -3,7 +3,7 @@
use std::process::Command; use std::process::Command;
use std::thread; use std::thread;
use std::time::Duration; use std::time::Duration;
use tracing::info; use log::info;
/// Find Claude Code's tmux pane by scanning for the "claude" process. /// Find Claude Code's tmux pane by scanning for the "claude" process.
pub fn find_claude_pane() -> Option<String> { pub fn find_claude_pane() -> Option<String> {

View file

@ -10,7 +10,7 @@ use capnp_rpc::{rpc_twoparty_capnp, twoparty, RpcSystem};
use futures::AsyncReadExt; use futures::AsyncReadExt;
use tokio::net::UnixStream; use tokio::net::UnixStream;
use tokio_util::compat::TokioAsyncReadCompatExt; use tokio_util::compat::TokioAsyncReadCompatExt;
use tracing::{info, warn}; use log::{info, warn};
use crate::channel_capnp::{channel_client, channel_server}; use crate::channel_capnp::{channel_client, channel_server};
use capnp::capability::Promise; use capnp::capability::Promise;

View file

@ -10,7 +10,7 @@
use crate::thalamus::{home, now, notify}; use crate::thalamus::{home, now, notify};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::fs; use std::fs;
use tracing::info; use log::info;
// Defaults // Defaults
pub const DEFAULT_IDLE_TIMEOUT: f64 = 5.0 * 60.0; pub const DEFAULT_IDLE_TIMEOUT: f64 = 5.0 * 60.0;

View file

@ -22,7 +22,7 @@ use serde::{Deserialize, Serialize};
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::fs; use std::fs;
use std::path::PathBuf; use std::path::PathBuf;
use tracing::info; use log::info;
use super::home; use super::home;

View file

@ -11,7 +11,7 @@ use std::collections::BTreeMap;
use std::fs::File; use std::fs::File;
use std::path::PathBuf; use std::path::PathBuf;
use std::process::Child; use std::process::Child;
use tracing::{info, warn, error}; use log::{info, warn, error};
fn channels_dir() -> PathBuf { fn channels_dir() -> PathBuf {
dirs::home_dir() dirs::home_dir()