shell dot on steroids https://pagure.io/shellfu

_pretty_journald.sh 553B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. _pretty__debug() {
  3. local decor="()"
  4. local caller_is_main=${caller_is_main:-false}
  5. local caller=${caller:-UNKNOWN}
  6. $caller_is_main && decor=
  7. sed "s/^/debug:$caller$decor: /" | systemd-cat -p debug -t "${0##*/}"
  8. }
  9. _pretty__die() {
  10. systemd-cat -p crit -t "${0##*/}"
  11. }
  12. _pretty__mkhelp() {
  13. systemd-cat -p notice -t "${0##*/}"
  14. }
  15. _pretty__mkusage() {
  16. systemd-cat -p notice -t "${0##*/}"
  17. }
  18. _pretty__think() {
  19. systemd-cat -p info -t "${0##*/}"
  20. }
  21. _pretty__warn() {
  22. systemd-cat -p warning -t "${0##*/}"
  23. }