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:
parent
917960cb76
commit
93bc49959c
19 changed files with 157 additions and 526 deletions
|
|
@ -77,7 +77,7 @@ impl Config {
|
|||
let path = config_path();
|
||||
match fs::read_to_string(&path) {
|
||||
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()
|
||||
}),
|
||||
Err(_) => {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
use super::{context, tmux};
|
||||
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.
|
||||
pub struct State {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use capnp_rpc::{rpc_twoparty_capnp, twoparty, RpcSystem};
|
|||
use clap::{Parser, Subcommand};
|
||||
use futures::AsyncReadExt;
|
||||
use tokio::net::UnixListener;
|
||||
use tracing::{error, info};
|
||||
use log::{error, info};
|
||||
|
||||
use crate::thalamus::{daemon_capnp, home, now, notify};
|
||||
|
||||
|
|
@ -435,18 +435,7 @@ async fn module_command(
|
|||
// -- Server mode ----------------------------------------------------------
|
||||
|
||||
async fn server_main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let log_path = home().join(".consciousness/logs/daemon.log");
|
||||
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();
|
||||
env_logger::init();
|
||||
|
||||
let sock = sock_path();
|
||||
let _ = std::fs::remove_file(&sock);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use daemon_capnp::daemon;
|
|||
use capnp::capability::Promise;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use tracing::info;
|
||||
use log::info;
|
||||
|
||||
pub struct DaemonImpl {
|
||||
state: Rc<RefCell<idle::State>>,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
use std::process::Command;
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use tracing::info;
|
||||
use log::info;
|
||||
|
||||
/// Find Claude Code's tmux pane by scanning for the "claude" process.
|
||||
pub fn find_claude_pane() -> Option<String> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue