From 893e5a177999b9188685c9612b2f7dcc0b3e2800 Mon Sep 17 00:00:00 2001 From: osbm Date: Thu, 27 Nov 2025 09:05:49 +0300 Subject: [PATCH] formatting --- modules/nixos/services/system-logger/system-logger.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/nixos/services/system-logger/system-logger.sh b/modules/nixos/services/system-logger/system-logger.sh index b31e9f7..bd1e16f 100755 --- a/modules/nixos/services/system-logger/system-logger.sh +++ b/modules/nixos/services/system-logger/system-logger.sh @@ -25,7 +25,7 @@ collect_logs() { local source="$1" local output="$2" local max_lines="$3" - + if [ -f "$source" ]; then # Get the last N lines to stay within size limit tail -n "$max_lines" "$source" > "$output" 2>/dev/null || true @@ -40,7 +40,7 @@ get_journal_logs() { local output="$1" local filter="$2" local max_lines="$3" - + journalctl --since "00:00:00" --until "23:59:59" \ --no-pager --output=short \ | grep -i "$filter" | tail -n "$max_lines" > "$output" 2>/dev/null || true @@ -49,7 +49,6 @@ get_journal_logs() { # Calculate approximate lines per log type to stay under 1MB # Assuming average line is ~100 bytes, we aim for ~10,000 total lines -TOTAL_LINES=10000 SSH_LINES=2000 KERNEL_LINES=2000 LOGIN_LINES=1000