logs: write debug.log to daemon/ subdir
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
90e68d6081
commit
bf5def4871
1 changed files with 2 additions and 2 deletions
|
|
@ -7,14 +7,14 @@
|
|||
// subconscious/ — autonomous agents (reflect, surface, consolidate, ...)
|
||||
// user/ — interactive agent (TUI, tools, API clients)
|
||||
|
||||
/// Debug logging macro — writes to ~/.consciousness/logs/debug.log
|
||||
/// Debug logging macro — writes to ~/.consciousness/logs/daemon/debug.log
|
||||
#[macro_export]
|
||||
macro_rules! dbglog {
|
||||
($($arg:tt)*) => {{
|
||||
use std::io::Write;
|
||||
let log_dir = std::path::PathBuf::from(
|
||||
std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string()))
|
||||
.join(".consciousness/logs");
|
||||
.join(".consciousness/logs/daemon");
|
||||
let _ = std::fs::create_dir_all(&log_dir);
|
||||
if let Ok(mut f) = std::fs::OpenOptions::new()
|
||||
.create(true).append(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue