use anyhow::{anyhow, Result};
use clap::{Args, Subcommand};
use crate::cli::RunContext;
#[derive(Args, Debug)]
pub struct LogsArgs {
#[command(subcommand)]
pub command: Option<LogsCommand>,
#[arg(long, default_value = "20")]
pub last: usize,
}
#[derive(Subcommand, Debug)]
pub enum LogsCommand {
Summary {
#[arg(long)]
by_module: bool,
#[arg(long)]
by_month: bool,
},
Export {
#[arg(long, default_value = "json")]
format: String,
},
Prune {
#[arg(long)]
older_than: String,
},
Clear,
Path,
}
pub fn run(_args: LogsArgs, _ctx: &RunContext) -> Result<()> {
Err(anyhow!(
"biolic logs is not yet implemented. See Section 5.9 of biolic_plan.md. \
Backend: SQLite at ~/.biolic/logs.db. Implement schema migrations first."
))
}