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

Function format_log_plain

src/apps/desktop/src/logging.rs:346–366  ·  view source on GitHub ↗
(
    out: fern::FormatCallback,
    message: &std::fmt::Arguments,
    record: &log::Record,
)

Source from the content-addressed store, hash-verified

344}
345
346fn format_log_plain(
347 out: fern::FormatCallback,
348 message: &std::fmt::Arguments,
349 record: &log::Record,
350) {
351 let target = record.target();
352 let simplified_target = if target.starts_with("webview:") {
353 "webview"
354 } else {
355 target
356 };
357
358 out.finish(format_args!(
359 "[{}][tid:{}][{}][{}] {}",
360 chrono::Local::now().format("%Y-%m-%dT%H:%M:%S%.3f"),
361 get_thread_id(),
362 record.level(),
363 simplified_target,
364 message
365 ))
366}
367
368pub async fn cleanup_old_log_sessions() {
369 tokio::time::sleep(tokio::time::Duration::from_secs(10)).await;

Callers

nothing calls this directly

Calls 2

targetMethod · 0.80
finishMethod · 0.45

Tested by

no test coverage detected