logger: add cgroup option

This commit is contained in:
Mikaël Cluseau
2026-04-13 21:11:07 +02:00
parent 33fcfbd197
commit dc936f52ab
8 changed files with 123 additions and 26 deletions

View File

@@ -6,10 +6,10 @@ use std::str::FromStr;
use crate::{fs, human::Human};
const CGROUP_ROOT: &str = "/sys/fs/cgroup/";
pub const ROOT: &str = "/sys/fs/cgroup";
pub async fn ls(parent: Option<impl AsRef<StdPath>>, exclude: &[String]) -> fs::Result<()> {
let mut root = PathBuf::from(CGROUP_ROOT);
let mut root = PathBuf::from(ROOT);
if let Some(parent) = parent {
root = root.join(parent);
}
@@ -50,8 +50,8 @@ pub async fn ls(parent: Option<impl AsRef<StdPath>>, exclude: &[String]) -> fs::
}
use tabled::settings::{
object::{Column, Row},
Alignment, Modify,
object::{Column, Row},
};
let mut table = table.build();
table.with(tabled::settings::Style::psql());