feat: set log timezone, closes #56

Implement a CLI arg, and config file setting, for changing the timezone of the Docker logs timestamp
This commit is contained in:
Jack Wills
2025-02-21 11:03:19 +00:00
parent 8305e6fda6
commit 17a5e7a258
27 changed files with 1122 additions and 163 deletions
+3 -4
View File
@@ -7,7 +7,6 @@ pub mod log_sanitizer {
};
/// Attempt to colorize the given string to ratatui standards
/// TODO this is somewhat slow/cpu intensive
pub fn colorize_logs<'a>(input: &str) -> Vec<Line<'a>> {
vec![Line::from(
categorise_text(input)
@@ -92,7 +91,7 @@ mod tests {
#[test]
/// Return test raw, as in show escape codes
fn color_match_raw() {
fn test_color_match_raw() {
let result = log_sanitizer::raw(INPUT);
let expected = vec![Line {
spans: [Span {
@@ -110,7 +109,7 @@ mod tests {
#[test]
/// Use the escape codes to colorize the text
fn color_match_colorize() {
fn test_color_match_colorize() {
let result = log_sanitizer::colorize_logs(INPUT);
let expected = vec![Line {
spans: vec![
@@ -143,7 +142,7 @@ mod tests {
#[test]
/// Remove all escape ansi codes from given input
fn color_match_remove_ansi() {
fn test_color_match_remove_ansi() {
let result = log_sanitizer::remove_ansi(INPUT);
let expected = vec![Line {
spans: vec![Span {