1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

log count

This commit is contained in:
Robin Appelman 2021-03-14 21:17:03 +01:00
commit 794a69f17b
3 changed files with 9 additions and 4 deletions

View file

@ -272,13 +272,14 @@ impl Cloud {
Ok(())
}
pub async fn logs(&self, docker: &mut Docker) -> Result<Vec<String>> {
pub async fn logs(&self, docker: &mut Docker, count: usize) -> Result<Vec<String>> {
let mut logs = Vec::new();
let mut stream = docker.logs::<String>(
&self.id,
Some(LogsOptions {
stdout: true,
stderr: true,
tail: format!("{}", count),
..Default::default()
}),
);