MCPcopy Create free account
hub / github.com/GCWing/BitFun / create_session_log_dir

Function create_session_log_dir

src/apps/desktop/src/logging.rs:192–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190}
191
192pub fn create_session_log_dir() -> PathBuf {
193 let logs_root = resolve_logs_root();
194
195 let timestamp = Local::now().format("%Y%m%dT%H%M%S").to_string();
196 let session_dir = logs_root.join(&timestamp);
197
198 if let Err(e) = std::fs::create_dir_all(&logs_root) {
199 eprintln!("Warning: Failed to create logs root directory: {}", e);
200 return logs_root;
201 }
202
203 if let Err(e) = std::fs::create_dir_all(&session_dir) {
204 eprintln!("Warning: Failed to create log session directory: {}", e);
205 return logs_root;
206 }
207
208 session_dir
209}
210
211pub fn build_log_targets(config: &LogConfig) -> Vec<Target> {
212 let mut targets = Vec::new();

Callers 1

newMethod · 0.70

Calls 4

create_dir_allFunction · 0.85
formatMethod · 0.80
resolve_logs_rootFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected