@@ -14,6 +14,7 @@ pub struct Args {
1414 pub build_grammars: bool,
1515 pub split: Option<Layout>,
1616 pub verbosity: u64,
17+ pub log_file: Option<PathBuf>,
1718 pub config_file: Option<PathBuf>,
1819 pub files: Vec<(PathBuf, Position)>,
1920}
@@ -48,6 +49,10 @@ impl Args {
4849 Some(path) => args.config_file = Some(path.into()),
4950 None => anyhow::bail!("--config must specify a path to read"),
5051 },
52+ "--log" => match argv.next().as_deref() {
53+ Some(path) => args.log_file = Some(path.into()),
54+ None => anyhow::bail!("--log must specify a path to write"),
55+ },
5156 arg if arg.starts_with("--") => {
5257 anyhow::bail!("unexpected double dash argument: {}", arg)
5358 }