Add first wrapper to watch syslog entries

This commit is contained in:
Daniel Siepmann 2024-06-27 15:38:28 +02:00
parent f3f8016fb2
commit 4bba9951df
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 27 additions and 3 deletions

View file

@ -15,7 +15,8 @@
gnome.gnome-screenshot
libnotify # Provide notify-send command
(callPackage ./packages/custom/update-nixos-system { })
(callPackage ./packages/custom/watch-project-logs { })
(callPackage ./packages/custom/watch-project-logs-warning { })
(callPackage ./packages/custom/watch-project-logs-notice { })
networkmanager_dmenu
i3blocks

View file

@ -0,0 +1,21 @@
{
writeShellApplication
}:
writeShellApplication {
name = "custom-watch-project-logs-notice";
# Futher info:
# - https://www.php.net/manual/en/errorfunc.configuration.php
# - https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Logging/Writers/Index.html#syslogwriter
# - https://en.wikipedia.org/wiki/Syslog#Severity_level
text = ''
journalctl -f \
--identifier TYPO3 \
--identifier php \
--priority notice..debug \
--output cat \
--output-fields=SYSLOG_TIMESTAMP,_CMDLINE,MESSAGE
'';
}

View file

@ -3,17 +3,19 @@
}:
writeShellApplication {
name = "custom-watch-project-logs";
name = "custom-watch-project-logs-warning";
# Futher info:
# - https://www.php.net/manual/en/errorfunc.configuration.php
# - https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Logging/Writers/Index.html#syslogwriter
# - https://en.wikipedia.org/wiki/Syslog#Severity_level
text = ''
journalctl -f \
--identifier TYPO3 \
--identifier php \
--priority warning \
--output cat \
--output-fields=MESSAGE,_CMDLINE
--output-fields=SYSLOG_TIMESTAMP,_CMDLINE,MESSAGE
'';
}