logger: add cgroup option
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user