Skip to content

Commit 4085434

Browse files
committed
修复日志失效的问题
1 parent e59400a commit 4085434

4 files changed

Lines changed: 5 additions & 2 deletions

File tree

src-tauri/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ log4rs = { version = "1.3.0", features = [
4747
"pattern_encoder",
4848
"serde",
4949
] }
50+
tempfile = "3.19.1"

src-tauri/log4rs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ appenders:
55
pattern: "{d} {l} - {m}{n}"
66
rolling_file:
77
kind: rolling_file
8-
path: "logs/app.log"
8+
path: "app.log"
99
encoder:
1010
pattern: "{d(%Y-%m-%dT%H:%M:%S)} {h({l}):<5.5} {M} {f} {L} ---> {m}{n}"
1111
policy:

src-tauri/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ use function::file::{file_existed, save_file};
33
use llm::context_builder::CodeGenRequest;
44
use serde::Deserialize;
55
use serde_json::{json, Value};
6-
use std::io::{self};
6+
use std::io::{self, Write};
77
use std::path::{Path, PathBuf};
88
use storage::code_sample::*;
99
use storage::datasource::*;
1010
use storage::init_db;
1111
use storage::sys_config::*;
1212
use task::code_gen_task::CodeGenTask;
1313
use task::{periodic_cleanup_inactive_tasks, TaskLog, TaskResult};
14+
use tempfile::NamedTempFile;
1415
pub mod datasource;
1516
pub mod db;
1617
pub mod function;

0 commit comments

Comments
 (0)