mirror of
https://github.com/Drop-OSS/drop-app
synced 2026-08-27 22:23:04 -04:00
feat(logging): Added line numbers to file logging and highlighting to console
This commit is contained in:
parent
9e29aa7a76
commit
7c3140e424
1 changed files with 4 additions and 2 deletions
|
|
@ -92,13 +92,15 @@ pub struct AppState<'a> {
|
|||
|
||||
fn setup(handle: AppHandle) -> AppState<'static> {
|
||||
let logfile = FileAppender::builder()
|
||||
.encoder(Box::new(PatternEncoder::new("{d} | {l} | {f} - {m}{n}")))
|
||||
.encoder(Box::new(PatternEncoder::new(
|
||||
"{d} | {l} | {f}:{L} - {m}{n}",
|
||||
)))
|
||||
.append(false)
|
||||
.build(DATA_ROOT_DIR.lock().unwrap().join("./drop.log"))
|
||||
.unwrap();
|
||||
|
||||
let console = ConsoleAppender::builder()
|
||||
.encoder(Box::new(PatternEncoder::new("{d} | {l} | {f} - {m}{n}")))
|
||||
.encoder(Box::new(PatternEncoder::new("{d} | {h({l})} - {m}{n}")))
|
||||
.build();
|
||||
|
||||
let config = Config::builder()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue