mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Introduce the stderr logger to the project
This commit is contained in:
parent
12358476da
commit
f757df5dfd
3 changed files with 30 additions and 1 deletions
|
@ -20,6 +20,10 @@ struct Opt {
|
|||
#[structopt(long = "db", parse(from_os_str))]
|
||||
database: PathBuf,
|
||||
|
||||
/// Verbose mode (-v, -vv, -vvv, etc.)
|
||||
#[structopt(short, long, parse(from_occurrences))]
|
||||
verbose: usize,
|
||||
|
||||
/// The query string to search for (doesn't support prefix search yet).
|
||||
query: Option<String>,
|
||||
}
|
||||
|
@ -27,6 +31,12 @@ struct Opt {
|
|||
fn main() -> anyhow::Result<()> {
|
||||
let opt = Opt::from_args();
|
||||
|
||||
stderrlog::new()
|
||||
.verbosity(opt.verbose)
|
||||
.show_level(false)
|
||||
.timestamp(stderrlog::Timestamp::Off)
|
||||
.init()?;
|
||||
|
||||
std::fs::create_dir_all(&opt.database)?;
|
||||
let env = EnvOpenOptions::new()
|
||||
.map_size(100 * 1024 * 1024 * 1024) // 100 GB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue