-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
I would like to have the journalctl logs shown in logDNA to be in JSON format.
Would it be possible to add an env var to enable journald to output logs in JSON format?
Such that when enabled it would change 'export' in the code below to 'json-pretty':
logdna-agent-v2/common/journald/src/journalctl/mod.rs
Lines 253 to 263 in d71e6f1
| pub fn create_journalctl_source() -> Result<impl Stream<Item = LineBuilder>, std::io::Error> { | |
| let mut journalctl_process = tokio::process::Command::new(JOURNALCTL_CMD) | |
| // The current boot | |
| .arg("-b") | |
| // follow | |
| .arg("-f") | |
| // set export format | |
| .arg("-o") | |
| .arg("export") | |
| .stdout(Stdio::piped()) | |
| .spawn()?; |
Or otherwise if there is another method that can achieve it at the moment?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels