Add basic plist file
This commit is contained in:
parent
ee793dc700
commit
3e976784b8
18
src/main.rs
18
src/main.rs
|
@ -11,7 +11,7 @@ use clap::{App, Arg};
|
|||
use std::path::Path;
|
||||
use std::sync::mpsc::Receiver;
|
||||
use log::{info, error, LevelFilter};
|
||||
use simplelog::{CombinedLogger, TermLogger, TerminalMode};
|
||||
use simplelog::{CombinedLogger, TermLogger, TerminalMode, SharedLogger};
|
||||
use std::process::exit;
|
||||
|
||||
mod ui;
|
||||
|
@ -54,12 +54,18 @@ fn main() {
|
|||
1 => LevelFilter::Info,
|
||||
2 | _ => LevelFilter::Debug,
|
||||
};
|
||||
let mut log_outputs: Vec<Box<dyn SharedLogger>> = Vec::new();
|
||||
|
||||
// Initialize terminal output
|
||||
let terminal_out = TermLogger::new(log_level, simplelog::Config::default(), TerminalMode::Mixed);
|
||||
if let Some(terminal_out) = terminal_out {
|
||||
log_outputs.push(terminal_out);
|
||||
}
|
||||
|
||||
//TODO: WriteLogger::new(LevelFilter::Info, Config::default(), File::create("my_rust_binary.log").unwrap()),
|
||||
CombinedLogger::init(
|
||||
vec![
|
||||
TermLogger::new(log_level, simplelog::Config::default(), TerminalMode::Mixed).unwrap(),
|
||||
//WriteLogger::new(LevelFilter::Info, Config::default(), File::create("my_rust_binary.log").unwrap()),
|
||||
]
|
||||
).unwrap();
|
||||
log_outputs
|
||||
).expect("Error opening log destination");
|
||||
|
||||
info!("espanso is starting...");
|
||||
|
||||
|
|
14
src/res/mac/com.federicoterzi.espanso.plist
Normal file
14
src/res/mac/com.federicoterzi.espanso.plist
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.federicoterzi.espanso</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/Users/freddy/Documents/espanso</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue
Block a user